How to retrieve N pieces of data with associated field values A/B/C from a table using one SQL statement?
Ask and answer your own questions
SELECT * FROM s_area AS a WHERE area_parent_id in (3,4,5) and 5 > ( SELECT COUNT(*) FROM s_area WHERE area_parent_id = a.area_parent_id AND area_id>a.area_id) order by area_sort asc
Ask and answer your own questions