Question Detail

How can i know in codeigniter data successfully inserted MySQL?

6 years ago Views 1321 Visit Post Reply

I am inserting data but how exactly I can know that my data is Really inserted. is there any predefine function or need to manually? Please help me to do this.


Thread Reply

Anonymous

- 6 years ago

The method you are looking for is $this->db->affected_rows().

So your return statement could look like this:

return $this->db->affected_rows();

it will return you the number of inserted Rows.