I have two columns of data. One column is called "like" which holds either the number 1 or 0. The other column is called "object" which can hold any word. I want to count the number of rows where the number 1 in the "like" column coincides with a certain word in the "object" column.
I have tried
$numrow1 = mysql_query("SELECT * FROM tablename WHERE like = 1 AND object = '$object' ");
$numlikes = mysql_num_rows($numrow1);
but I got a syntax error. Any help would be appreciated.