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;
how to get last id in database codeigniter 4
$db = db_connect();
$query = $db->query("SELECT * FROM users ORDER BY id DESC LIMIT 1");
$result = $query->getRow();
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