[eluser]Unknown[/eluser]
I was hoping someone could point me in the right direction with this snippet of code. I'm trying to pull a specific date range from a database.
Here is my code snippet...
Model:
Code:
$code = $this->session->userdata('code');
$start_date = $this->input->get_post('start_date');
$end_date = $this->input->get_post('end_date');
$query = $this->db->where('code', $code )->where('request_date >=', $start_date)->where('request_date >=',$end_date)->get( 'dispatch' );
if( $query->num_rows() > 0 ) {
return $query->result();
} else {
echo "No records found...";
return array();
}
Currently it grabs the records but ignores the date ranges completely. Any help would be greatly appreciated!