how to insert last id from crud grocery codeigniter
To insert the last ID from CRUD in CodeIgniter's Grocery CRUD, you can use the following steps:
Step 1: Set the primary key in the table where you want to insert the last ID.
Step 2: In the controller function for the insert operation, use the insert
method provided by Grocery CRUD to insert the data.
Step 3: After the insert
method, use the $this->db->insert_id()
method to retrieve the last inserted ID.
Step 4: You can then use this last inserted ID as needed in your application.
These steps will allow you to effectively insert the last ID from CRUD in CodeIgniter's Grocery CRUD.