Welcome Guest, Not a member yet? Register   Sign In
insert_id function bug - Interesting
#1

[eluser]pakistanvoices[/eluser]
hi buddies
I have separate database connection for "read" and "write", I have used insert_id() to get the last inserted id, it was working fine but in last few days, I was getting problem with my functionality, after tracking the code, I have found the insert_id function is giving the wrong value. It was really astonishing for me, any one have an idea about this problem or any one face this problem, then let me know.

My code:

Database Connection :
$this->DBr = $this->load->database('db_read', TRUE);
$this->DBw = $this->load->database('db_write', TRUE);

These are define in constructor of that particular model.

Function :
$this->DBw->insert_id(); // Giving the wrong value.


Best of Luck

Javaid


Messages In This Thread
insert_id function bug - Interesting - by El Forum - 11-23-2010, 01:28 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 08:35 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 10:54 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 11:11 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 11:25 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 11:30 AM
insert_id function bug - Interesting - by El Forum - 11-23-2010, 11:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB