I am using table user_like
to save user like hits.
Table structure is as follow.
id user_id song_id like
--------------------------------
67 2 148 0
All column datatype is int(11).
$song_id=$_GET['song_id'];
$query="select * from atr_like WHERE song_id = '$song_id' and like = 0";
$rs = mysql_query($query) or
die(mysql_error());
echo mysql_num_rows($rs);
I am getting following error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like = 0' at line 1.
I am not able to point out root cause of error is it looks everthing is okay.
Please help.
Thanks in advance.