If I save a model, does the getLastInsertId() return the last insert ID or does it return the ID from the row I’ve just saved. In other words if I do this:
$this->Model->save($this->data);
__thisFunctionTakesAVeryLongTimeToExecute();
$insertId = $this->Model->getLastInsertId();
Does getLastInsertId() return the ID from the data I’ve saved 2 lines above. Or does it return the latest ID that’s created?
not sure about lastInsertId but… why dont you use
$this->Model->idinstead?? after saving the info, the last inserted id gets stored there