Advertisement
tourniquet

Untitled

Aug 29th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.31 KB | None | 0 0
  1. SELECT ads.*, sub.name AS subcategory, cat.name AS category, image AS image
  2. FROM cls_ads AS ads
  3. INNER JOIN cls_categories AS sub ON ads.subcategory_id = sub.id
  4. INNER JOIN cls_categories AS cat ON sub.parent_id = cat.id
  5. INNER JOIN cls_images AS image ON ads.id = image.ad_id
  6. ORDER BY published DESC
  7. LIMIT 10 OFFSET 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement