Re: Find - table join - find all posts by user_id using the name

2008-09-30 Thread Benster
Cracked it! $this->set('posts',$this->Post- >find('all',array('conditions'=>array('User.name'=>$username; Ben. On Sep 30, 3:58 pm, Benster <[EMAIL PROTECTED]> wrote: > Hi, > > Im building a site where i would like to retrieve all articles based > on a username.  The username is supplied as

Find - table join - find all posts by user_id using the name

2008-09-30 Thread Benster
Hi, Im building a site where i would like to retrieve all articles based on a username. The username is supplied as part of the url i.e. mysite.com/userName. So i need to use find to list all posts based on username however I only have user_id in the posts table, which then joins to the user ta