inner join with containable cakephp
I have 3 tables, restaurants, orders, users. orders table has fields restaurant_id, status and user_id. restaurant -> hasMany orders orders belogsTo Restaurant orders belongsTo users I need to find only those restaurants that have order with status = 1, and at the same time need to fetch user's info. So, I am making inner join with orders table, $options['joins'] = array( array('table' => 'orders', 'alias' => 'Order', 'type' => 'INNER', 'conditions' => array( 'Restaurant.id = Order.restaurant_id', ) ) ); But how Can I also get users' information along with this, because according to cake docum
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.