Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
My SQL query is below. It works fine on my local host, but when i upload to my linux server i get the above error. What is wrong?
this works on my local host, so why wouldn't it work on my server? is it a file path error? the MySQL database is identical, and i have a specific connect file for the server, that is different from the local host. my other database queries are working.
it is not an issue with the $id variable, because i tried testing it by replacing it with 1, and my error message was the same.
it is also not an issue with the connection to the database. this file has a number of other queries that are working properly.
return (mysql_result(mysql_query("SELECT COUNT('id') FROM POSTS WHERE id=$id"),0)==0)?false:true;// this query works. because it doesnt have '' on the words posts/id