I'm trying to construct a query that will populate a drop-down with all available albums that are not already a child album of a given album being modified.
My query so far is as follows, and yes, I know it's not correct. I've put it here to try to better exemplify what I need:
Code: Select all
$query = "SELECT a.id, a.name FROM album AS a, album_rel AS r WHERE a.id != r.child_id AND r.parent_id != '" . $rowї'id'] . "' ORDER BY a.name";