Insert and Update database checking |
(12-26-2015, 12:14 PM)pb.sajjad Wrote: Hello... You can know inserted or updated performed of not by $this->db->affected_rows(); if affected rows are greater than zero, insert or update operation is affected. ----------------------------------------------------------------------------------------------------- is there some situation that MySQL does not insert or update? What is these reasons? In development environment error reporting is on, so if any error occurred in insert or update query, webpage will throw error. in dev environment, error reporting is on. But in production environment, if any error occured in sql query then you will not be notified and there is possibility that you insert (or update) will not affected at db level and still you are not aware of it. Generally, We are developing code in dev environment and make fully testing and then we are moving code to production environment, so logically this situation is not possible but technically this situation is possible if you are directly coding in production environment. To understand codeigniter environment, please visit https://www.codeigniter.com/user_guide/g...ments.html |
Messages In This Thread |
Insert and Update database checking - by pb.sajjad - 12-26-2015, 12:14 PM
RE: Insert and Update database checking - by RobertSF - 12-26-2015, 04:07 PM
RE: Insert and Update database checking - by skunkbad - 12-26-2015, 04:28 PM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 01:27 AM
RE: Insert and Update database checking - by pb.sajjad - 12-27-2015, 04:37 AM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 05:20 AM
RE: Insert and Update database checking - by pb.sajjad - 12-27-2015, 10:09 AM
RE: Insert and Update database checking - by pmbaldha - 12-27-2015, 08:58 PM
RE: Insert and Update database checking - by pb.sajjad - 12-28-2015, 03:33 AM
RE: Insert and Update database checking - by Diederik - 12-28-2015, 01:13 AM
|