如何在查询生成器中使用unix_timestamp

While I want to get UNIX_TIMESTAMP() in the query this is what happens:

Code:

$this->db->where(array('is_active' => 1, 'time' => 'UNIX_TIMESTAMP()'));
$this->db->update('table', array('is_active' => 0));

Result:

UPDATE `table` SET `is_active` = 0 WHERE `is_active` = 1 AND `time` = 'UNIX_TIMESTAMP()'

I want UNIX_TIMESTAMP() without quotes and not like 'UNIX_TIMESTAMP()'

You can use time function of PHP which is equivalent to UNIX_TIMESTAMP()

$this->db->where('is_active',1);
$this->db->where('time = UNIX_TIMESTAMP()',null, FALSE);
$this->db->update('table', array('is_active' => 0));

You can use third parameter of where clause as false

If time is timestamp you can simply use time() function of PHP as

$this->db->where(array('is_active' => 1, 'time' => time()));
$this->db->update('table', array('is_active' => 0));