Hello, im having trouble with this code, i have a page where u can reserve driver to do some tasks, i need to implement a new feature that lets the user see what task is the driver scheduled for.
i want to get the type of the task and display it so that the user can see what he is doing at that time right now im trying with this. this driver has 3 reservations for the same day, each with three different task. task1 = dc_run task2 = removal task3 = dressing so when i eco this it only shows dc_run which is from 8am to 11 am. how can i display it the 3 different tasks hes scheduled for? i would the output to be like this
8am - 11am : dc_run. 12pm - 3pm : removal 4pm - 6pm : dressing.
here it only shows the first record and not the other two..
thanks for your help
PHP Code:
$sqltype ="SELECT res_startTime,res_endTime,type FROM reservation WHERE res_date='$actDate' AND res_driver_id=1 ORDER BY res_startTime";
$rstype1 = mysql_fetch_array(mysql_query($sqltype));
echo $rstype1['res_startTime'] . " - " . $rstype1['res_endTime'] . " : " . $rstype1['type'];
|