ah, some other part of the system is making the save()?
I mean, there needs to be a save to get the last insert ID?
and.. is this helpful?
public $virtualFields = array('insert_id' => 'last_insert_id()');
I think there are some problems listed on the 'net about mysql client
connections holdin
The problem is, I'm not saving any data. I'm just pulling it out of
the database.
On 1 aug, 13:01, Douglas Reith wrote:
> 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->Ingr
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 t
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
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http