Codeigniter Drukuj ostatnie zapytanie SQL
print_r($this->db->last_query());
Real Rat
print_r($this->db->last_query());
$sql="Select * from my_table where 1";
$query = $this->db->query($SQL);
return $query->result_array();
$query = $this->db->query("SELECT * FROM users;");
foreach ($query->result('User') as $user)
{
echo $user->name; // access attributes
echo $user->reverse_name(); // or methods defined on the 'User' class
}
$query = $db->query('YOUR QUERY HERE');
$this->db->get_compiled_select()