[英]Codeigniter Active record And Or combinations in where clause with multiple & nested groups
[英]Multiple on clause using codeigniter active record
我需要使用codeigniter活動記錄對左聯接查詢執行多次on子句。 我寫這段代碼:
$this->db->join('table1', 'table1.col1 = table2.id', 'left');
$this->db->where_not_in('table.col2', $list);
通過執行此codeigniter,添加where not in子句,而我需要添加一個與左聯接有關的ON子句。 如果可能,我想使用活動記錄。
$this->db->join('table1', 'table1.col1 = table2.id AND col2 NOT IN ('.implode(',', $list).')', 'left');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.