Thread: PHP/MySQL help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    PHP/MySQL help


    Hello everyone,

    I have a problem regarding PHP/MySQL. I've been learning PHP, along with HTML/CSS/jQuery (jQuery just started), for a month now, without any prior programming/markup experience, so be soft here. :P

    Anyways, I've come across a problem I can't solve and I'd be grateful if someone here can solve it for me. I have a leaning more towards the front-end development, so I kinda suck at PHP (haven't really done anything in more than a week), but I would like to know the basics at least. Hope someone answers, thank you in advance.

    Problem:

    Let's say we have a database called 'store', a table called 'movies' and a table called 'reservations'. I need to create a .php page with movie titles (let's say the column is named 'movienames') sorted alphabetically, for example:

    Almost Famous
    American History X
    Apocalipse Now
    .
    .
    .

    I should create a link on every title that leads to another page we can call 'reservations.php'. There, we should list the schedule of reservations for a certain movie. Obviously, there should be a primary key ('movienames') from movies in 'reservations' as a secondary key. We should also have a date column, let's call it 'resDate' and one more secondary key from another table (video store users for example) we can call 'users'. We should format it like this:

    Almost Famous
    Monday, Marko
    Saturday, Eric
    Sunday, Ivan
    .
    .
    .

    That's basically it, I should also have a link on 'reservations.php' that leads to the main page we can call 'index.php'.

    Thx again!

    P.S. I'm sure it's an easy task for you, but I'm really awful at PHP and I neglect it whenever I can.
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,730
    Rep Power
    1959
    Are you looking for help to create it yourself? or someone to make it for you?

    If you want someone else to do it for you, you should ask in the "Hire a programmer" forum.

    If you want to learn how to do it, we need to know which kind/level of help you need.
    e.g. do you need help to know how to:
    - create a database?
    - make the connection from PHP to the database?
    - get specific data
    - etc.

    I suggest you try to search for tutorials explaining how to use the PDO and/or mysqli connection (notice the i at the end of mysqli).
    Last edited by MrFujin; September 8th, 2013 at 06:43 PM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    27
    Rep Power
    0
    you can fire a query as follows from your table names:

    SELECT *
    FROM movies
    ORDER BY name ASC
    This way you'll need to match your table/column names.
    and then link the listed movies.
    Hope this helps.

IMN logo majestic logo threadwatch logo seochat tools logo