I need your help, How do I Select from a parent table, only if child table (another table that depends on id of parent table) has rows in php?
For instance:
I have CATEGORY
table and Items
table. Where Category
is the parent table and contains ct_id, ct_name
, while Items
is child table which contains it_id, ct_id
(linked to parent table), it_name
PS: I don't need to select items, but I need only Categories ONLY if there are items linked to this table.
Thank you