Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    24
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Join query leads to error?

    PHP Code:
        $maak_tabel mysql_query
        
    ("SELECT F.naam, F.jaar, F.genre_id, G.naam AS genre
        FROM film F
        JOIN genre G
        ON F.genre_id = G.id"
    ); 
    Could anyone explain to me why this leads to an error? It works in phpmyadmin and it also works when I change "F.naam" into "naam". What am I missing here?

    Thanks in advance!

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    What is the error?

    Find out by using mysql_error(), possibly in or die( mysql_error() )
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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