RE: [PHP] MySQL Date
| From: | John W. Holmes | Date: | Wed, 19 Mar 2003 17:28:08 +0000 |
| Subject: | RE: [PHP] MySQL Date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140312@lists.php.net to get a copy of this message | ||
> 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
... WHERE your_date = CURDATE() ...
> e.g.
>
> $today = mysql_result($result, $i, Booking_Date);
>
> if($today = *HELP*){
or...
if($today == date('Y-m-d'))
(notice the second equals sign!)
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/