I just moved my website to a new server (Shared to VPS)
I expected errors, and the only error that is really puzzling me is this SQL statement.
echo mysql_query("SELECT COUNT(*) FROM users_online_now")
This returns nothing! And if I try the mysql_num_rows, it returns
mysql_num_rows(): supplied argument is not a valid MySQL result resource..
If I query another table though eg:
echo mysql_query("SELECT COUNT(*) FROM users")
It works fine.
I am guessing it’s something to do with the naming of the table? It worked fine on my previous host, is there some setting I should modify?
Update:
Figured out. The server is still going thru DNS changes, and the mySQL is completely messed up. DNS has finally updated!
Try to find out what error you get by adding
or dielike this:Also make sure that you have already connected to mysql database successfully, see these functions for that:
mysql_connectmysql_select_dbNote: In names you should use backtick character (`) rather than single quote.
Update:
If you have a MySQL Database that has a table with a damaged Index, you may get an error:
Here is the possible solution.
.
More threads on the problem:
http://forums.mysql.com/read.php?21,18436,18436
http://www.linuxquestions.org/questions/linux-software-2/mysql-crash-on-startup-incorrect-file-format-host-464422/
http://www.devcomments.com/SQL-Error-incorrect-file-format-to138833.htm