[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