簡體   English   中英

使用codeigniter活動記錄的多個on子句

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM