A Database Error Occurred

Error Number: 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 'ORDER BY p.posted_on DESC LIMIT 0,9' at line 1

SELECT p.*,pc.title as category_name FROM `tb_posts` p, tb_post_categories pc WHERE p.category_id=pc.id and p.is_deleted=0 AND p.status=1 AND p.posted_on <= '2024-03-28' AND p.category_id= ORDER BY p.posted_on DESC LIMIT 0,9

Filename: models/Homemodel.php

Line Number: 993