Error Message Update Success
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and windows update error message policies of this site About Us Learn more about Stack Overflow the windows update error message 800b0100 company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users iphone update error message Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes java update error message a minute: Sign up notifying the user about successful update in codeigniter up vote 3 down vote favorite 1 i'm using these two lines to update my table using codeigninter active records $this->db->where('reference_number', $reference); $this->db->update('patient', $data); what i want to de is to check weather it successfully updates the table and according to that i want to give a notification to
Microsoft Error Message
the user, how can i check the successful update is happened with this lines? there is a no clue in the user guide telling that by putting the line if($this->db->update('patient', $data)); will give us a true or false value, can we do like that? or is there any other solution to this problem? regards, Rangana php activerecord codeigniter error-handling share|improve this question edited Aug 17 '10 at 6:37 vikkun 5,2931774121 asked Aug 17 '10 at 6:23 Rangana Sampath 65912145 Here is an answer : stackoverflow.com/questions/20030642/… –Istiaque Ahmed Feb 3 '14 at 10:56 add a comment| 4 Answers 4 active oldest votes up vote 11 down vote accepted You can put a code like this in your model... function func() { $this->db->where('reference_number', $reference); $this->db->update('patient', $data); $report = array(); $report['error'] = $this->db->_error_number(); $report['message'] = $this->db->_error_message(); return $report; } _error_number and _error_message use the mysql_errno and mysql_error functions of php. Then inside your controller, you can check for the error like this... $this->load->model("Model_name"); $report = $this->Model_name->func(); if (!$report['error']) { // update successful } else { // update failed } share|improve this answer answ
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the
Internet Explorer Error Message
company Business Learn more about hiring developers or posting ads with us Stack Overflow windows media player error message Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 service pack 3 error message million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Updating records, getting successful message but data isn't being updated in database up vote 0 down vote favorite I http://stackoverflow.com/questions/3499814/notifying-the-user-about-successful-update-in-codeigniter am building a "edit_post" page for my site so users can edit what they have previously posted(duh), I am getting the notification "Updated data successfully" but the data isn't being updated in mysql http://stackoverflow.com/questions/17712801/updating-records-getting-successful-message-but-data-isnt-being-updated-in-dat . mysql_error()); } echo "Updated data successfully\n"; mysql_close(); } else { } ?> Here is my form code