SQLerror in query(): 1064: 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 'all,0)
AND `p2`.`status`=`p`.`status`' at line 8
On query:
SELECT DISTINCT `p`.`id_property`, `p`.`street`, `p`.`city`, `p`.`state`, `p`.`zip`, `p`.`sell_status`, `p`.`map_lat` as `lat`, `p`.`map_long` as `lng`, `p`.`currency_symbol`, `p`.`id_currency`, `p`.`price`, `p`.`domain` FROM `properties` as `p`, `properties` as `p2` WHERE `p`.`id_property`!='40217'
AND `p`.`id_client`='3608'
AND `p`.`showInOtherListings`='1'
AND `p`.`status`='1'
AND `p`.`pid`='0'
AND `p2`.`id_client`=`p`.`id_client`
AND `p2`.`showInOtherListings`='1'
AND `p2`.`pid` IN (all,0)
AND `p2`.`status`=`p`.`status`
/home/single/apps/singleprop/includes/database_mysql.inc.php line 200 SQLerror in query(): 1064: 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 'all,0) AND `p2`.`status`=`p`.`status`' at line 8 On query: SELECT DISTINCT `p`.`id_property`, `p`.`street`, `p`.`city`, `p`.`state`, `p`.`zip`, `p`.`sell_status`, `p`.`map_lat` as `lat`, `p`.`map_long` as `lng`, `p`.`currency_symbol`, `p`.`id_currency`, `p`.`price`, `p`.`domain` FROM `properties` as `p`, `properties` as `p2` WHERE `p`.`id_property`!='40217' AND `p`.`id_client`='3608' AND `p`.`showInOtherListings`='1' AND `p`.`status`='1' AND `p`.`pid`='0' AND `p2`.`id_client`=`p`.`id_client` AND `p2`.`showInOtherListings`='1' AND `p2`.`pid` IN (all,0) AND `p2`.`status`=`p`.`status`