note 26038 added to function.date
| From: | gcraick at gamefeeder dot php dot net | Date: | Wed, 16 Oct 2002 02:38:09 +0000 |
| Subject: | note 26038 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38139@lists.php.net to get a copy of this message | ||
You may find this useful...
This mySQL statement pulls rows from a table starting from 7 days in the past.. Saves doing it in
PHP and manipulating results via date functions before or after.
SELECT * FROM releases WHERE release_date >= FROM_DAYS((TO_DAYS(NOW())-7));
of course releases and release_date are whatever table and field in your database respectively.
--
http://www.php.net/manual/en/function.date.php
http://master.php.net/manage/user-notes.php?action=edit+26038
http://master.php.net/manage/user-notes.php?action=delete+26038
http://master.php.net/manage/user-notes.php?action=reject+26038