Thanks for the helkp guys - this worked a treat
: $this->Post->getInsertID();
On Friday, 27 July 2012 10:43:52 UTC+1, bigjimmi wrote:
>
> Is it possible within a Add() function to find the ID of a post just as
> its written to the DB?
>
> Basically I'm trying to create a ACO for the post when its saved by doing
> something like this:
>
> $aco = $this->Acl->Aco->create(Array('model'=>Post, foreign_key=>'XXXX'));
>
> Where XXXX is the ID of the post that's just been saved within the same
> function.
>
> Thanks in advance
>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php