Alternative to direct SQL in CP3?
A portal that I'm currently migrating to CP3 has one of the following SQL statements in one of its models:
$sql = "SELECT hm.id, l.label FROM visibility v, hier_menus hm LEFT JOIN labels l ON (l.label_id = hm.id AND l.tbl=" .TBL_HM. " AND l.fld=1) LEFT JOIN labels l2 ON (l2.label_id = hm.id AND l2.tbl=" .TBL_HM. " AND l2.fld=2)