How to select all data with query LIKE in Codeigniter [closed]
Why can not I use '%' or '' in LIKE query builder to select all data? I try in SQL shell can, but in query builder can not My Model public function ajax_getTargetMhs($where,$where2) { $this->db3->SELECT("nim,nama,kodeunit") ->FROM("akademik_ms_mahasiswa") ->LIKE('kodeunit',$where) ->LIKE('periodemasuk',$where2); $query = $this->db3->get(); if( $query->num_rows() > 0 ) { return $query->result(); } else { return array(); } } My Controller public function getTargetMhs($where,$where2) { $json =$this->Survey_Model->ajax_getTargetMhs($where,$where2); $arr = array(); foreach ($json as $results) { $ar
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.