help with using time in sql

Discussion in 'PHP/MySql' started by tinkle, Jan 26, 2010.

Remove these ads by signing in
Remove these ads by signing in
Thread Status:
Not open for further replies.
  1. tinkle New Member

    Member Since:
    Jan 26, 2010
    Message Count:
    1
    Likes Received:
    0
    Hi this is my first computing project for A-levels to create database for a website which allows me to book salon appointments, (using phpmyadmin)



    each customer is registered and can book apointments on when to have there appointment and by which salon specialist, although one salon specialist(staff)can only serve one customer at a time.

    *** for example betty books a a appointment at 9:30am-10:00am with staff member cathrine

    so the tables I have are:

    Customer, Staff, Booking
    -----------------------------------------------
    Customer: CustomerID (P), password, fname, sname

    Staff: StaffID (P), fanme, sname

    Booking: BookingID (P), CustomerID, StaffID, ???BookingTime???
    ----------------------------------------------------------

    ^Does this look ok? I really don't know how time would work in this table with mysql, would it be better to have time as a seperate table or to have time start and end for each staff member?


    major thanks for replies :rollingeyes:
  2. SeoKungFu Active Member

    Member Since:
    Jul 10, 2009
    Message Count:
    597
    Likes Received:
    76
    Occupation:
    SEO Ninja
    2 people like this.
  3. crivion Member

    Member Since:
    Nov 10, 2009
    Message Count:
    38
    Likes Received:
    0
    that structure's ok I don't know why you want to keep it separate
  4. johndesenio New Member

    Member Since:
    Feb 9, 2010
    Message Count:
    18
    Likes Received:
    2
    [FONT=Verdana, sans-serif]You need to add another field in Booking table. If there is a field BookingTimeIn you should put a BookingTimeOut to determine your done in appointment with your customers. The datatype for BookingTimeIn and BookingTimeOut is datetime.[/FONT]
Thread Status:
Not open for further replies.

Share This Page