DB::select()->from('pages') ->join('pages_rel')->on('pages.id', '=', 'pages_rel.desc') ->where('pages_rel.asc', $child) ->and_where('pages_rel.desc', '!=', 'pages_rel.asc') ->execute();
DB::select() ->from('pages') ->join('pages_rel')->on('pages.id', '=', 'pages_rel.desc') ->where('pages_rel.asc', $child) ->and_where('pages_rel.desc', '!=', DB::expr('pages_rel.asc')) ->execute();
It looks like you're new here. If you want to get involved, click one of these buttons!