codeigniter las query code example
Example 1: codeigniter raw query
$sql="Select * from my_table where 1";
$query = $this->db->query($SQL);
return $query->result_array();
Example 2: query builder codeigniter
$this->db->set('name', $name);
$this->db->set('title', $title);
$this->db->set('status', $status);
$this->db->insert('mytable');