note 10845 deleted from function.date by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 00:53:35 +0000 |
| Subject: | note 10845 deleted from function.date by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20070@lists.php.net to get a copy of this message | ||
I hab some good advice from here, too.
thanks to tom@subblue.com
So, here's my advice for this messageboard:
To select all fields between now and 14 Days ahead you can simply query the mysql database with a
this sql (datum is a date-field). It formats the result as well(dd.mm.YYYY). But note:
It's better programming to reformat and choose by the programm rather than by sql!
$sql = "SELECT DATE_FORMAT (datum, 'e.c.Y')";
$sql .= " from table";
$sql .= " WHERE";
$sql .= " (datum BETWEEN";
$sql .= " SYSDATE() AND DATE_ADD(NOW(), INTERVAL 14 DAY))";