Welcome Guest, Not a member yet? Register   Sign In
can someone show me function insert_id(); in codeinger4 ?
#1

please show me function insert_id() in  codeter 4 ?

thank you verry much
Reply
#2

https://codeigniter4.github.io/CodeIgnit...b-insertid
Reply
#3

(This post was last modified: 10-25-2022, 11:20 PM by startup.)

(10-25-2022, 10:33 PM)kenjis Wrote: https://codeigniter4.github.io/CodeIgnit...b-insertid

i use insertId follow above link it info

Call to undefinedmethod CodeIgniter\Database\MySQLi\Builder::insertID() 
Call to undefined method CodeIgniter\Database\MySQLi\Builder::insertID()
PHP Code:
public function Add($table,$data){
        if(isset($data) && $data != NULL){
            $builder $this->db->table($table);
            $builder->insert($data);
            return $builder->insertID();
        }
    
Reply
#4

PHP Code:
return $this->db->insertID(); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB