Welcome Guest, Not a member yet? Register   Sign In
Function $this->db->insert_id() to get last inserted record id always returns 1
#4

[eluser]Andy UK[/eluser]
For reasons unbeknownst to me, it is now working. The only change i made was switching from this

Code:
return $this->db->insert_id();

To this...

Code:
return mysql_insert_id();

Not strange in itself. But when I switched back again the first option worked too!

No idea what's going on there, but it's working now.


Messages In This Thread
Function $this->db->insert_id() to get last inserted record id always returns 1 - by El Forum - 05-01-2014, 11:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB