Shaun,

It should be: date("Y-m-d"). MySQL stores the dates as "yyyy-mm-dd", and that function 
returns the current date on the format you need.

Check the date() function on the php manual.
--
Un gran saludo/Big regards...
   Arturo Barajas, IT/Systems PPG MX (SJDR)
   (427) 271-9918, x448

> -----Original Message-----
> From: shaun [mailto:[EMAIL PROTECTED]
> Sent: Miercoles, 19 de Marzo de 2003 07:19 a.m.
> To: [EMAIL PROTECTED]
> Subject: [PHP] MySQL Date
> 
> 
> Hi,
> 
> I have a date stored in a table in my MySQL Database using a 
> DATE type for
> the column.
> 
> How can i compare the date in the table to today
> 
> e.g.
> 
> $today = mysql_result($result, $i, Booking_Date);
> 
> if($today = *HELP*){
>     echo "you are booked today";
> }else{
>     echo "you are free today";
> }
> 
> thanks for your help
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to