There is a MySQL query that returns all comments.
But I need to return only those where the field comments.is_active=1 . It is impossible to correct, already tortured, constantly:
You have an error in your SQL syntax ...
Where to add WHERE c.is_active=1 ?
SELECT c.id_comment, c.id_parent, u.login, n.title_news, cat.category_name, c.`comment`, c.date_time, c.is_active FROM comments c LEFT JOIN users u ON u.id = c.id_user LEFT JOIN news n ON n.id_news = c.id_news LEFT JOIN category cat ON cat.id_category = n.id_category ORDER BY c.date_time DESC LIMIT {$start},{$limit};