codeigniter-base-model
codeigniter-base-model copied to clipboard
How kind of fuzzy query? like?
trafficstars
The $this->db->like('name','david') was not support? Or use $before_get function ? I wrote it myself?
Of course you can! :-)
class Post_model extends MY_Model
{
public function search($column, $term, $w = 'both')
{
$this->db->like($column, $name, $w);
return $this;
}
}
Use it like this:
$this->post_model->search('title', 'Hello')
->get_all();