Or to expand for a particular name: SELECT p.name, h.hobbyName FROM person p LEFT JOIN hobbies h ON p.id=h.personId WHERE p.name='John';
On Sep 8, 2:36 pm, serpentskiss <[EMAIL PROTECTED]> wrote: > I think that this is more what you're after. It will return all names, > and say if they have a hobby or not > > SELECT p.name, h.hobbyName FROM person p LEFT JOIN hobbies h ON > p.id=h.personId --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PHP & MySQL" 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/phpmysql?hl=en -~----------~----~----~----~------~----~------~--~---
