Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在codeigniter中,如何查找两个日期之间的数据_Php_Codeigniter - Fatal编程技术网

Php 在codeigniter中,如何查找两个日期之间的数据

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('

如何在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('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)。”;