Table referencing
Posted: Wed Nov 19, 2003 10:02 am
Hi can anyone help?
I am trying to write a program that uses information from one mysql table and references another, based on the users input. E.G The information is equipment so the user selects what equipment they require like video cameras. I want the program to reference the number of video cameras with the date required and the date returned (this is so I dont get any double bookings) it also needs to reference the days in between as there is a maxium of 5 days on each booking. I have created a function that counts the days from the date required so thats not a problem.
I have only two tables equipment and booking
the booking table
bookid
date
time
equip1
equip2
equip3
equip4
equip5
date required
date returned
the equipment table
equipid
equipname
equipnumber (Each peace of equipment has been given a number like DVC001)[/php_man]
I am trying to write a program that uses information from one mysql table and references another, based on the users input. E.G The information is equipment so the user selects what equipment they require like video cameras. I want the program to reference the number of video cameras with the date required and the date returned (this is so I dont get any double bookings) it also needs to reference the days in between as there is a maxium of 5 days on each booking. I have created a function that counts the days from the date required so thats not a problem.
I have only two tables equipment and booking
the booking table
bookid
date
time
equip1
equip2
equip3
equip4
equip5
date required
date returned
the equipment table
equipid
equipname
equipnumber (Each peace of equipment has been given a number like DVC001)[/php_man]