Hi there,
I am trying to get todays date in a format that I can input directly into the database. the options I have found (mon etc.) require a bit of alteration before they can be compared against dates in the database...i.e. filling zeros etc. Is getdate() the correct function to use? If so what steps do I need to make to enable comparisons with database dates?
Thanks in advance for any help!
Audrey
I have this so far:
$today = getdate();
$month = $today['mon'];
$mday = $today['mday'];
$year = $today['year'];
$today = $month . $mday . $year;
#echo "TODAY=" . $today;
#selecting room type and number where the dept date= today
$sql = "SELECT room.Room_no,room.Type FROM room INNER JOIN reservation ON reservation.Room_no = room.Room_no WHERE $Dept_Date = '$today'";