SELECT articles.id FROM articles LEFT JOIN users ON articles.user_id=users.id LEFT JOIN categories_articles ON categories_articles.article_id=articles.id LEFT JOIN categories ON categories_articles.category_id=categories.id WHERE categories.id=56 AND articles.publish=1 GROUP BY articles.id ORDER BY articles. LIMIT 0, 0