Please how can I get last insertedID on ci4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Please how can I get last insertedID on ci4 (/showthread.php?tid=76613) |
Please how can I get last insertedID on ci4 - jerozeek - 06-01-2020 I am currently building a new application using ci4. I have been working with the user guide in the cause of the development. I have been finding it difficult to get the last insertedID after saving or inserting a data in my DB table. Please I need help ASAP. Tnk RE: Please how can I get last insertedID on ci4 - jreklund - 06-01-2020 If you are using the model: $this->getInsertID() $model->getInsertID() If you are using it without the model: $this->db->insertID() |