I have a query in which i wanted to compare the ip address of system with the existed ip in records of table. but not able to compare the ip .. when i use normal query for counting records it works but not with Ip address in Where clause. my query is as below
SELECT count(product_id) AS count_likes, product_count FROM
'._DB_PREFIX_.'count_likes WHERE product_id = '.$product_id.' AND ip-address =
"'.trim($ip_address).'";
I just want o compare ip and count no of matching records.