I need to insert some details into the database and get the identifier of the auto_incremented record that has just been inserted into the database in the same function.
First, I use a controller to tell the model to insert all the data using the following:
$this->client->add_new_client();
Then, right after that, I need to insert the customer ID, which was automatically generated by the database with the details added to the database, in another model using:
$this->model->add_new_details($client_id);
Any help would be fantastic.
Greetings
source
share