Codeigniter Active record: greater than statement

后端 未结 4 1380
灰色年华
灰色年华 2021-01-07 23:25

I\'m trying to convert a \"greater than\" where statement to CI\'s Active Record syntax. When I use this snippet

    $this->db->join(\'product_stocks\'         


        
4条回答
  •  清歌不尽
    2021-01-07 23:49

    Either

    $this->db->where('product_stocks.stock_level >', '1');
    or
    $this->db->where(array('product_stocks.stock_level >'=>'1'));
    should do it. Note the space between the field name and the operator; otherwise you will end up getting Error 1064.

提交回复
热议问题