I am having trouble with a MySQL join query - unfortunately I am not too good with joins.
Table page_section:
-------------------
id
page_id
name
display_ord
Try this:
Select page_section_id.* from page_section_id natural join page_section
WHERE page_section_id IN (1,2,3,4,5) order by page_section_id.display_order
select pss.*
from page_section_sub pss
inner join page_section ps on pss.page_section_id = ps.id
where pss.page_section_id in (1, 2, 3, 4, 5)
order by ps.display_order
Try this way:
SELECT * FROM page_section
LEFT JOIN page_section_sub ON page_section.page_id = page_section_sub.page_id
WHERE page_section_id IN (1,2,3,4,5)
ORDER BY display_order;