Hello the following query work on my local server
mysql_query("SELECT count(yp_list.listid)
AS total, count(yp_cat.cid) as totalcat
FROM yp_list
JOIN yp_cat
ON yp_list.cid = yp_cat.cid
WHERE yp_list.cid IN (SELECT yp_cat.cid FROM yp_cat WHERE yp_cat.parentid = $cid OR yp_cat.cid =$cid)
GROUP BY yp_cat.cid",$db);
but it does not work some some server.
It shows this error
ErrorYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT yp_cat.cid FROM yp_cat WHERE yp_cat.parentid='11' or yp_