Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Controller:
- $dateRange=$this->input->post('dateRange');
- $explodedateRange=explode('-',$dateRange);
- $waktu=trim($explodedateRange[0]);
- $waktu2=trim($explodedateRange[1]);
- $stat='Publish';
- #Model:
- public function dataByRangeStat($waktu,$waktu2,$stat){
- $query=$this->db->query("SELECT * FROM ".$this->table." WHERE stat='".$stat."' AND DATE_FORMAT(art_date, '%m/%d/%Y') between '".$waktu."' AND '".$waktu2."'");
- return $query->result();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement