Re: get model id by a set of conditions

2010-02-09 Thread Graham Weldon
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 wrote: > It sounds like you need to read the boo

Re: get model id by a set of conditions

2010-02-09 Thread WebbedIT
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 Q

get model id by a set of conditions

2010-02-08 Thread Ernesto
Hello. i'm looking for a function that gets the id from a given set of conditions. 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