Re: retrieving data from multiple tables for dropdown

2011-07-05 Thread elogic
Thankyou for your reply. I tried that but I got an error, I then however put the following into the properties controller and it looks like I am closer but it still isn't quite right. $estates = $this->Property->User->find('all', array('conditions' => array('User.group_id' => 4), 'fields' => array

Re: retrieving data from multiple tables for dropdown

2011-07-05 Thread Vulinux
Hi elogic. Since both, Account and Property, belong to User, it should be as easy as follows: In your UsersController (app/controllers/users_controller.php), just do $this->User->find('all', array('conditions' => array('Users.group_id' => 4))); The method "find('all')" will then return all the

retrieving data from multiple tables for dropdown

2011-07-04 Thread elogic
Hi All, I have 3 tables, accounts, users, properties. Within the properties add / edit pages I need to populate two select dropdowns with data from the accounts table however I am not sure how to go about this. TABLE INFO (basics) ACCOUNTS id first_name last_name USERS id username password acco