Php 在codeigniter中,如何查找两个日期之间的数据
如何在php中获取两个日期之间的数据Php 在codeigniter中,如何查找两个日期之间的数据,php,codeigniter,Php,Codeigniter,如何在php中获取两个日期之间的数据 $this->db->select('*'); $this->db->from('table_name'); this-> db ->where('t_deadline' between $start_deadline and $end_deadline); 但此查询不执行。$this->db->where('order\u date>=',$first\u date); $this->db->where('
$this->db->select('*');
$this->db->from('table_name');
this-> db ->where('t_deadline' between $start_deadline and $end_deadline);
但此查询不执行。$this->db->where('order\u date>=',$first\u date);
$this->db->where('order_date >=', $first_date);
$this->db->where('order_date <=', $second_date);
return $this->db->get('orders');
$this->db->where('order\u date试试这个:
$this->db->select('*');
$this->db->from('table_name');
$this->db->where('t_deadline >=', $start_deadline);
$this->db->where('t_deadline <=', $end_deadline);
$query = $this->db->get();
$result = $query->result();
print_r($result);
$this->db->select('*');
$this->db->from('table_name');
$this->db->where('t\u deadline>=',$start\u deadline);
$this->db->where($this->db->where(“$start\u deadline.”和“$end\u deadline.”之间的t\u deadline可能是最后一行的重复项,$this->db->where($t\u deadline)。”;