My query to get data by month
$this->db->select('vehicle_make_and_model');
$this->db->join('tukai_drivers','tukai_drivers.driver_id=reqn_challans.dc_driver_id','left');
$this->db->where('dc_challan_date','MONTH(2)');
$this->db->order_by('dc_challan_id','desc');
$result=$this->db->get('reqn_challans')->result();
I am trying it via codeignitor like this
$this->db->where('dc_challan_date','MONTH(2)');
It did not work? What is wrong
Storing date like this
http://awesomescreenshot.com/0424q72ne5
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…