簡體   English   中英

Codeigniter活動記錄查詢,其中

[英]codeigniter active record query with where

我在查詢中有3個條件,我希望所有條件僅與codeigniter活動記錄合並在數組中。

$this->db->where(array('id'=>5,'name'=>$name));  // I want to insert create_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH) here in this where array

請不要提出任何建議單獨添加此條件的解決方案。

謝謝 !

嘗試這個

$this->db->where(array('id'=>5,'name'=>$name))
$this->db->where('create_date >=', "DATE_SUB(NOW(), INTERVAL 1 MONTH)")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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