【问题标题】:How to use "greater-than" and "less-than" in db->get_where() in CodeIgniter? [duplicate]如何在 CodeIgniter 的 db->get_where() 中使用“大于”和“小于”? [复制]
【发布时间】:2018-07-14 11:20:49
【问题描述】:

我的项目有问题。因为我的逻辑想要像

$this->db->get_where('products', array('prod_price' > 100 ));

所以。不知道有没有办法解决。

【问题讨论】:

    标签: php codeigniter activerecord


    【解决方案1】:

    自定义运算符应该是列字符串的一部分:

    $this->db->get_where('products', array('prod_price >', 100 ));
    # Here --------------------------------------------^
    

    【讨论】:

    • 所以我不再使用'=>'了?
    猜你喜欢
    • 1970-01-01
    • 2019-09-02
    • 2013-09-02
    • 2023-03-05
    • 2018-07-28
    • 2020-04-22
    • 1970-01-01
    • 2017-11-30
    • 2011-09-04
    相关资源
    最近更新 更多