RE: [PHP] PHP/MySQL
| From: | John W. Holmes | Date: | Fri, 22 Nov 2002 13:18:11 +0000 |
| Subject: | RE: [PHP] PHP/MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125605@lists.php.net to get a copy of this message | ||
> What is the line code to optain the system date?
> I propose is to compare the system date with the date in one field in
the
> database... Then what would be the mysql command to select all the
rows
> with
> date with 10 days or less from the system date?
NOW, CURDATE(), or CURRENT_DATE
SELECT * FROM your_table WHERE your_date_column > NOW() - INTERVAL 10
DAY;
---John Holmes...