Cakephp query 2 tables
Posted on 2010-08-17
I have an issue with Cakephp...
! have a Model ..call it "User", then a controller and a view.
Model1 currently lists records in table "users" but I have another table that has a user_id field and I need to be able to display records from both tables as they are related and should be linking through "users.id" and "othertable.user_id" fields.
In the View, I need to list records using both tables.
How do I do this please?
I need a simple short example so I can understand it as I've been all over the net and none of those samples work for me.
Hope someone can help