Would anyone be able to show me how to pull values from a MySQL Database, using PHP?
There is a table equipmentbooked with the fields: BookingID, ItemID, Week, Day, Period.
I need to construct a table in PHP, for say Mondays bookings, with either the values obtained from the database, or "Available" if there is no bookings made.
-------
$equipmentbookings = @mysql_query( "SELECT * FROM equipmentbooked WHERE (ItemID = $id)");
if ($equipmentbookings) {
while ($equipmentbooking = mysql_fetch_assoc($equipmentbookings)) {
$ItemID = $equipmentbooking['ItemID'];
----
my problem arises here - how can I retrieve bookings made for Week1, Day Monday, Period 1-10?
Thanks for any help
Steven
There is a table equipmentbooked with the fields: BookingID, ItemID, Week, Day, Period.
I need to construct a table in PHP, for say Mondays bookings, with either the values obtained from the database, or "Available" if there is no bookings made.
-------
$equipmentbookings = @mysql_query( "SELECT * FROM equipmentbooked WHERE (ItemID = $id)");
if ($equipmentbookings) {
while ($equipmentbooking = mysql_fetch_assoc($equipmentbookings)) {
$ItemID = $equipmentbooking['ItemID'];
----
my problem arises here - how can I retrieve bookings made for Week1, Day Monday, Period 1-10?
Thanks for any help
Steven