CodeIgniter imprima la última consulta SQL
print_r($this->db->last_query());
Real Rat
print_r($this->db->last_query());