codelgniter database get query code example
Example 1: get result count codeigniter
public function record_count() {
return $this->db->count_all("tablename");
}
Example 2: cideigniter orLike()
$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR `body` LIKE '%match%' ESCAPE '!'