如何在codeigniter中添加数字? 代码
$this->db->where(array('is_active' => 1, 'time + duration <=' => time()));
$this->db->update('table', array('is_active' => 0));
将导致:
UPDATE `table` SET `is_active` = 0 WHERE `is_active` = 1 AND `time +` `duration` <= 1436170717
我想要
`time` + `duration`
答案 0 :(得分:0)
我在它们之间添加了引号,但它确实有用。
$this->db->where(array('is_active' => 1, '\'time\' + \'duration\' <=' => time() ));