Jump to content


Joining tables side effect?

  • Please log in to reply
1 reply to this topic

#1 MrLarkins.com

  • Members
  • PipPip
  • Member
  • 20 posts

Posted 13 October 2006 - 05:06 PM

ok, i think i know the answer here

if pull data from several different tables and join them by a common item, say member id, what happens when a member id doesn't have data in the second table?

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 13 October 2006 - 07:30 PM

If you use an INNER JOIN, you won't get any record, since that type of JOIN requires a matching record in both tables.  If you use a LEFT JOIN, you will get back all records from the table on the "left", and NULLs for the requested columns from the table on the "right".
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users