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 5 of 5

Thread: Help

  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help

    Hello,

    I am making a database for a project for school. I need to make a website with movie trailers on it.
    I have made two tables, one is called Movie, the other one is called category.
    In the Trailer table I have made these fields:
    -Naam
    -Year
    -cat_ID(which is linked to a field in the other table)

    In the category table I have these fields:
    -category(Name of the category)
    -cat_ID

    Now I have made a link with both cat_ID fields. Now I want to be able to see category(the fields only in the category table) when I use the SQL query.

    Does anyone know how to do this?

    Thnx for your help!

    P.S. Sorry for my bad English, I'm dutch

  • #2
    Regular Coder Linux_Sage's Avatar
    Join Date
    Mar 2014
    Location
    Sterling,VA
    Posts
    106
    Thanks
    0
    Thanked 10 Times in 10 Posts
    You could just do something like

    Code:
    SELECT c.category FROM category c, Move m
    WHERE m.cat_ID = c.cat_ID;

    Or perhaps you could do:
    Code:
    SELECT c.category FROM category c
    INNER JOIN Move m ON m.cat_ID = c.cat_ID;

  • #3
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This what I get:

    #1146 - Table 'project_film_trailers.move' doesn't exist

  • #4
    Regular Coder Linux_Sage's Avatar
    Join Date
    Mar 2014
    Location
    Sterling,VA
    Posts
    106
    Thanks
    0
    Thanked 10 Times in 10 Posts
    Post the SQL you tried to run and the name of all your tables you're using.

  • #5
    New to the CF scene
    Join Date
    Apr 2014
    Location
    Belgium
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by firehawx View Post
    This what I get:

    #1146 - Table 'project_film_trailers.move' doesn't exist
    seems to me like a typo

    btw i'm dutch too

    should be movie in stead of move


  •  

    Posting Permissions

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