SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast TheNinthPlayer's Avatar
    Join Date
    Jan 2004
    Location
    USA
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inner vs Outter Joins

    I am having some difficulty understanding the diffrence between Inner & Outter joins. Does anyone know where I could find some detailed informaion about the diffrences between these joins?

  2. #2
    SitePoint Guru
    Join Date
    May 2004
    Location
    santa rosa, ca
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this link:
    http://www.techonthenet.com/sql/joins.htm

    An inner join gives records with matching values in both tables. An outer join gives data from one table with rows from a secondary table that match.
    An outer join gives rows from the 1st table even though a match in the second table was not found.
    nondenominational, noncommercial, nonprofit,
    listener-supported, 24-hour, Christian ministry:
    Listen Live Online

  3. #3
    SitePoint Enthusiast TheNinthPlayer's Avatar
    Join Date
    Jan 2004
    Location
    USA
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx, Now heres a new question. How can a perform multiple inner joins using WHERE?

    I tried this but I get an error.
    Code:
    SELECT cvarName, typeName, catergoryName, cvarDescription, cvarDefault FROM {$_GET['lang']}_cvars_hl, {$_GET['lang']}_types, {$_GET['lang']}_catergories WHERE {$_GET['lang']}_cvars_hl.modId = {$_GET['mod']}, {$_GET['lang']}_cvars_hl.typeId = {$_GET['lang']}_types.typeId;
    If I try it with either one of the WHERE statments alone it works fine but when I try and combine them with an "," it fails.

  4. #4
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to use an AND or an OR for multiple joins, you can't separate them by commas.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •