codeigniter get insert iditer print last query

PHP
$id = $this->db->insert_id();
Source

Also in PHP: