[英]codeigniter active record query with where
I have three where conditions in my query and I want all them to merge in array only with codeigniter active record. 我在查询中有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
Please dont suggest any solution like to add this condition separately. 请不要提出任何建议单独添加此条件的解决方案。
Thanks ! 谢谢 !
try this 尝试这个
$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.