Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT ads.*, sub.name AS subcategory, cat.name AS category, image AS image
- FROM cls_ads AS ads
- INNER JOIN cls_categories AS sub ON ads.subcategory_id = sub.id
- INNER JOIN cls_categories AS cat ON sub.parent_id = cat.id
- INNER JOIN cls_images AS image ON ads.id = image.ad_id
- ORDER BY published DESC
- LIMIT 10 OFFSET 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement