Hi all,
I am new to php and mysql and designing a booking system
I converted the date using date format and I want to display the converted date into the appropriate column togather with other appointment details
I tryed to used a nested query to do that
can any one help to find the problem or suggest a different way
many thanks
the following is the code
$query = "SELECT b.ref_num,
p.fname,
p.lname,
h.name,
h.location,
h.address,
t.newdate
FROM booking b, patient p, hospital h,
( SELECT date_FORMAT(app_date, '%a,%e %M, %Y, %l:%i%p')as newdate FROM time_slot t)
WHERE b.nhs_num = p.nhs_num
AND b.hospital_id = h.hospital_id
AND b.slot_id = t.slot_id
AND b.ref_num = '{$_SESSION['valid_user']}'
ORDER BY b.ref_num";