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 'Advocat' AND id_prop != '10009' GROUP BY id_prop ORDER BY order_img, RAND() ' at line 71