How to query sql with active record for dates between specified times

后端 未结 5 1833
执念已碎
执念已碎 2020-12-16 18:25

I have a database that I want to pull only certain rows that have dates in specified ranges. I\'m not sure how to do this properly in active record. Right now it looks like

5条回答
  •  我在风中等你
    2020-12-16 18:48

    `$where = array(
      "order_datetime <" => "2012-10-03",
      "order_datetime >" => "2012-10-01"
    );
    $this->db->select("*")->get_where("topics_list" , $where)`
    

提交回复
热议问题