【问题标题】:Using 'having' in CodeIgniter's Active Record在 CodeIgniter 的 Active Record 中使用“have”
【发布时间】:2012-09-02 15:06:52
【问题描述】:

有谁知道为什么这种语法不起作用/导致服务器错误?

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

【问题讨论】:

    标签: php codeigniter activerecord syntax


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2013-04-11
      • 2013-06-14
      • 2013-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-24
      • 1970-01-01
      • 2012-06-05
      相关资源
      最近更新 更多