is there a trick to LEFT JOINS

Discussion in 'Databases' started by mnymkr, Jun 26, 2007.

  1. #1
    This is driving me batty

    I have executed my first LEFT JOIN and it works awesome

    $result = mysql_query("SELECT a.carat, a.color, a.clarity, a.shape  FROM diamonds AS a 
    INNER JOIN clarity AS b ON a.clarity = b.clarity
    
    ORDER BY a.carat LIMIT 1,10 ");
    Code (markup):
    However when I go and add another INNER JOIN I get an error

    I even went as far to check to make sure the field types matched etc which I don't think that matters.

    When I add

    INNER JOIN shape AS c ON a.shape = c.shape
    Code (markup):
    I get an error

    So I trouble shot it and just added the shape JOIN in and still error

    thing is that the clarity table and the shape table are very similar and I do not see why the shape wouldn't work.
     
    mnymkr, Jun 26, 2007 IP
  2. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #2
    nvm thank you

    echo mysql_error($link);

    we live and we learn
     
    mnymkr, Jun 26, 2007 IP
  3. flippers.be

    flippers.be Peon

    Messages:
    432
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    flippers.be, Jun 26, 2007 IP