Welcome Guest, Not a member yet? Register   Sign In
Getting the last database identifier
#1

[eluser]bikuta[/eluser]
Hi, I was wondering whether it was possible with active query to get the last id that was generated after a new record has been entered into the database.

So basically I've got something like this:

$this->obj_model->add($data);

// need to get unique id from previous command to update a value in $otherdata

$this->otherobj_model->add($otherdata);


the add() methods just calls a $this->db->insert command.


Messages In This Thread
Getting the last database identifier - by El Forum - 02-02-2008, 06:57 AM
Getting the last database identifier - by El Forum - 02-02-2008, 07:27 AM
Getting the last database identifier - by El Forum - 02-02-2008, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB