Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: hire booking query

    For my A level ICT coursework I am developing a web based solution for booking bicycles for a local company. (I am using php/mysql/dreamweaver/phpmyadmin (if this helps).)
    I want the user to be able to check the availability of bikes before continuing to book the bikes, i.e. go to a screen to enter date they want to book bikes, continue to results screen displaying which bikes are available and then finally to a booking screen.
    Using mysql I have built a table called ‘hirebooking’, with the following fields
    title
    forename
    surname
    telephoneno
    emailaddress
    dateofhire (in yyyy-mm-dd form)
    notes
    And fields for each bike i.e. adventurer 1, megabyte 2, trailabike1.
    So far I have made a page to insert a booking. Tick boxes determine whether a customer requires to hire a certain bike.
    If a customer hires for example ‘adventurer 1’ a ‘0’ appears to be stored in the field, when the record is saved.
    By the way I am a complete novice with php and mysql. Any solutions/help asap would be greatly appreciated, (the coursework has to be handed in soon!!!!). Thanks in advance.

  2. #2
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    What do you need help with?

  3. #3
    Join Date
    Mar 2004
    Posts
    17
    what you can do is to move the bike fields to a new table that contains the bike id, and the bike name so that you can add as many bikes as you want regardless of having the same model. in addition to those said fields, you should add a userid in relation to the users table or customers that is. if the value of the user id in the bikes table, then the bike is available for booking.

    here is my suggestion for the table structure:

    CUSTOMERS
    customerid
    customername
    otherdetails

    BIKES
    bikeid
    customerid
    bikename
    otherdetails


    select the appropriate bike using the bikeid and if the customerid field returns a null value, then the bike is available for booking.

    hope this helps.
    What? Can't move without me?

Posting Permissions

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