I think the actual function is mysql_num_rows() but from the error you are receiving I'd guess that the query is not be executed.
Where you have: mysql_query(
query string); change it to:
- PHP: Select all
mysql_query(querystringhere) or die(mysql_error());
This will show any errors with the query.
Have you put in the right database connection string for your server? The connection for your localhost and the connection for your server will be different no doubt.