Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to check data is updated or not in codeigniter

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


Please Help Members By Posting Answers For Below Questions

How to add / link an images/css/javascript from a view in ci?

689