codeigniter return last inserted id
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
codeigniter return last inserted id
$this->db->insert('posts', $post_data);
$insert_id = $this->db->insert_id();
return $insert_id;
get last row codeigniter
$query = $this->db->query("SELECT * FROM date_data ORDER BY id DESC LIMIT 1");
$result = $query->result_array();
return $result;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us