Answers for "codeigniter 3 get last inserted row"

PHP
0

codeigniter return last inserted id

$this->db->insert('posts', $post_data);
   $insert_id = $this->db->insert_id();
   return  $insert_id;
Posted by: Guest on September-26-2020
0

get last row codeigniter

$query = $this->db->query("SELECT * FROM date_data ORDER BY id DESC LIMIT 1");
$result = $query->result_array();
return $result;
Posted by: Guest on October-23-2020

Code answers related to "codeigniter 3 get last inserted row"

Browse Popular Code Answers by Language