Hi,

I'm a bit new to this, I'm trying to do a left join.

I have a db with People table (id:name_id) in it a linking table
(linking name_id to addr_id) and an address table with the index
(addr_id)

the sql command I usually use is:

SELECT persons_address.addr_id FROM addresses left JOIN
persons_address ON persons_address.addr_id = addresses.addr_id WHERE
persons_address.name_id ='.$name_id

I'm assuming I need a model for the linking table.

How would I go about creating a query to print out the users name with
the linked address below? I've got as far as outputting the user name.

Are their any examples?

Darren


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to