I had the same problem, the connection was ignored:
$r1 = $db->where("object2_type", $object_type) ->join($object_type, "$object_type.id = object1_id", "LEFT") ->where("$object_type.id IS NULL", null, false) ->delete("knots");
so I did it like this:
$ids = $db->select("knots.id") ->where("object2_type", $object_type) ->join($object_type, "$object_type.id = object1_id", "LEFT") ->where("$object_type.id IS NULL", null, false) ->get("knots")->result_object(); $ids_csv = $this->mh()->get_flat_items_as_csv($ids); $r = $db->where("knots.id IN ($ids_csv)", null, false)->delete("knots);
Fusca software
source share