Welcome Guest, Not a member yet? Register   Sign In
Please how can I get last insertedID on ci4
#1

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
Reply
#2

(This post was last modified: 06-01-2020, 02:09 PM by jreklund.)

If you are using the model:
$this->getInsertID()
$model->getInsertID()

If you are using it without the model:
$this->db->insertID()
Reply




Theme © iAndrew 2016 - Forum software by © MyBB