SELECT b.id, b.name, b.nickname, b.dob, b.cover, SUBSTRING( d.content, 1, 100 ) as content
FROM awards a
LEFT JOIN babies b ON a.baby_id = b.id
LEFT JOIN diary d ON b.id = d.baby_id
ORDER BY a.creation_date DESC, d.creation_date DESC
LIMIT 0, 1
Query Time: 0.0001 sec
Rows: 1
SELECT id, title, cover_image, SUBSTRING( content, 1, 200 ) as content, content_type FROM cms_content ORDER BY display_order DESC LIMIT 6
Query Time: 0.0001 sec
Rows: 6