Paste the start of your error message into Google, or your preferred search engine, and you will find the hundreds of times this exact question has been asked before. The answer hasn't changed: mysql_query[^] returns false if the query fails. You need to test for that before trying to count the number of rows. As to why your query failed, that's up to you. You haven't shown any code, nor the structure of your database, so nobody can tell you what the problem with your query is.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer