The query:
SELECT ct_cid as level1 FROM cat_tree WHERE ct_sid=$sid_int AND ct_parent =$cid_int) UNION (SELECT ct_cid as level2 FROM cat_tree WHERE ct_sid=$sid_int AND ct_parent IN level1)
The query is supposed to find the child nodes up to 2 levels of a tree node.
I get "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'level1
)" How can I use the results of the 1st select in the 2nd select?