peopleID should match: SELECT lastname, model FROM people, machines WHERE machines.peopleID = people.peopleID;
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 2. júna 2003 9:19 To: [EMAIL PROTECTED] Subject: my first select I made a small DB of people and machines, where one person can have more than one machine, each machine can be assigned to only one person. people | machines, one-to-many. I have a primary key ID field in each table (peopleID, machineID) and in the machines table I have the peopleID, the foreign key. So this should query should work, no? SELECT lastname, model FROM people, machines WHERE machines.machinesID = people.peopleID; What happens is it simply produces a list of last names and a list of machines in the order of each ID, they are not "matched" properly. (It's really just 2 list.) What might some of my problems be? Thanks, Ted -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]