Php 使用';拥有';在CodeIgniter';s的活动记录

Php 使用';拥有';在CodeIgniter';s的活动记录,php,codeigniter,activerecord,syntax,Php,Codeigniter,Activerecord,Syntax,有人知道为什么这个语法不起作用/导致服务器错误吗 $this->db->having('post_timestamp >=' . strtotime('last saturday')); 如果您使用的是MySQL,查询可能会被转义。试试这个: $this->db->having('post_timestamp >='. strtotime('last saturday'), NULL, FALSE);

有人知道为什么这个语法不起作用/导致服务器错误吗

    $this->db->having('post_timestamp >=' . strtotime('last saturday')); 

如果您使用的是MySQL,查询可能会被转义。试试这个:

$this->db->having('post_timestamp >='. strtotime('last saturday'), NULL, FALSE);