Make a query and get the results to make another query

Hello I’m new in cakephp 2. I have one problem. I do not know how to do the following query I have two tables campaign and users, I make a query about the campaign table and about the results of doing a search on users. |---------| | Camping | |---------| | id | |---------| | name | |---------|

|----------| | User | |----------| | id | |----------| | name | |----------| |Camping_id|

In PHP I do the following a query “Select * from camping where id = 1;” and with the results I make another query in the users table “Select * from user where camping_id = result.camping”

Learn more about retrieving data here:

And here is how to create subqueries: