Monday, August 1, 2011

Re: mysql_insert_id() as virtual model field

I'm sorry if I've mistook your question, but after you've done a save with Cake you can just use
Model->id
will that work?

e.g. from the book:
  1. $this->Ingredient->save($newData);
  2. $newIngredientId = $this->Ingredient->id;


On 30/07/11 18:53, Johkke wrote:
Is it possible to have the mysql_insert_id as virtual field of an model?  I'm implementing an ticket system interface and ticket numbers given by the mysql_insert_id  

No comments: