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 'subcat_id) AND `postenddate`>='2020-08-09' AND `status`='1' ORDER BY RAND() LIMI' at line 1