Jump to content

Need help with sql query.


mabus

Recommended Posts

I have 2 tables, say, "Person" and "Hobbies". Person can have zero or more hobbies. Here's what the table structure looks like:

 

Person  (Id , Name)

Hobbies (Id, PersonId, HobbyName)

 

How do I get all the Person->Id where Person->Name is, say, 'John' regardless if the record has a hobby?

Link to comment
https://forums.phpfreaks.com/topic/123216-need-help-with-sql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.