📜  Codeigniter 3 获取未来日期记录 - 来自数据库的即将到来的记录 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:50.642000             🧑  作者: Mango

代码示例1
public function getUpcomingevents($limit) {
        $this->db->select('*');
        $this->db->from('events');
        $this->db->where('is_active',"1");
        $this->db->where('date > DATE(now())');
        $this->db->order_by('id', 'DESC');
        $this->db->limit($limit);
        $query = $this->db->get();
        return $query->result();
    }