i still don't understand why you had to use microsoft word ~ptui~
your script failed in several places, because you apparently lost the semicolon at the end of a few statements
the email and phones tables did not load because you had UNIQUE keys on the email address and phone numbers, but they were all bullpuk@spammer.org and xxx-xxx-xxxx
attached is a "corrected" script that actually runs (you might want to create a separate testing database to try it, so as not to overwrite your actual data)
then run this query:
Code:
SELECT l_name, f_name, city, num, address
FROM names
LEFT JOIN IDcity ON names.mem_id = IDcity.mem_id
LEFT JOIN cities ON IDcity.city_id = cities.city_id
LEFT JOIN IDphone ON names.mem_id = IDphone.mem_id
LEFT JOIN phone ON IDphone.phone_id = phone.phone_id
LEFT JOIN IDemail ON names.mem_id = IDemail.mem_id
LEFT JOIN email ON IDemail.email_id = email.email_id
--WHERE city = 'Richmond'
ORDER BY l_name, f_name
notice that the WHERE clause is commented out
these are the results:
Code:
l_name f_name city num address
Abbot Chris Concord xxx-xxx-xxx2 bullpuk8@spammer.org
Adams J. Richard Livermore xxx-xxx-xxx3 bullpuk1@spammer.org
Albertson Suzanne San Ramon xxx-xxx-xxx4 bullpuk2@spammer.org
Allen Linda Livermore xxx-xxx-xxx5 bullpuk3@spammer.org
Anderson Bob Livermore xxx-xxx-xxx6 bullpuk4@spammer.org
Appleby Wendy Roseville xxx-xxx-xxx7 bullpuk5@spammer.org
Arrambide Juan Hayward xxx-xxx-xxx8
Aufdenkamp Jan Pleasanton xxx-xxx-xxx9 bullpuk6@spammer.org
Bacskai Judith Kensington xxx-xxx-xx10 bullpuk7@spammer.org
Bacskai Robert Kensington xxx-xxx-xx10 bullpuk7@spammer.org
Ball Karin San Ramon xxx-xxx-xx12 bullpuk9@spammer.org
Bastani Ali Concord xxx-xxx-xx13 bullpuk10@spammer.org
Benjamin Daniel Livermore xxx-xxx-xx14
Berckmoes Russ Pleasanton xxx-xxx-xx15 bullpuk11@spammer.org
Blanco Gail Pleasanton xxx-xxx-xx16 bullpuk12@spammer.org
Boerman Brian Folsom xxx-xxx-xx17
Boerman Carla Folsom xxx-xxx-xx17
Bond Richard Dublin xxx-xxx-xx18 bullpuk13@spammer.org
Bousfield Sarah Reno xxx-xxx-xx19 bullpuk14@spammer.org
McKay Deb San Ramon xxx-xxx-xxx4 bullpuk2@spammer.org
notice anything? it's working!!! it does not give the "unknown column 'city'" error message

now uncomment the WHERE clause and see if you can explain what happens
Bookmarks