If the model is "Post", you can do the following:

$post = $this->Post->find('first', array(
    'conditions' => array( .... ),
    'fields' => array('Post.id')
));

Your ID will be in: $post['Post']['id']


On Tue, Feb 9, 2010 at 8:57 PM, WebbedIT <p...@webbedit.co.uk> wrote:

> It sounds like you need to read the book on how to use Model::find().
>
> http://book.cakephp.org/view/449/find
>
> http://book.cakephp.org/view/453/field
>
> If you are still stuck then you will need to provide more details on
> the models, fields, conditions involved.
>
> HTH
>
> Paul
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to