Answer Posted / Surendra Singh
To check if data has been updated in CodeIgniter, you can compare the old and new values of a particular record. Here's an example using an update method:
1. Retrieve the old data from the database (e.g., $old_data = $this->model->getById($id);).
2. Update the record with the new data in your model (e.g., $this->model->updateData($new_data, $id);).
3. Check if the number of rows affected by the update query is greater than 0 to determine if the data has been updated successfully.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers