print sql query in codeigniter code example
Example 1: codeigniter print last sql query
print_r($this->db->last_query());
Example 2: codeigniter raw query
$sql="Select * from my_table where 1";
$query = $this->db->query($SQL);
return $query->result_array();