Re: Include today's date in a SQL statement?
| From: | Jonathan Pitcher | Date: | Wed, 05 Feb 2003 16:04:18 +0000 |
| Subject: | Re: Include today's date in a SQL statement? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134429@lists.php.net to get a copy of this message | ||
Brian,
$Today = // Date format that you use that can be compared to the date stored in the database.
$Query = "WHERE start_date < $Today and end_date >=$Today";
I just showed the where statement of the query. You can add in any statement you want before that to select or manipulate data based on the results.
Jonathan Pitcher
Webmaster Capitol Federal Savings
On Wednesday, February 5, 2003, at 09:14 AM, Brian Dunning wrote:
What would the SQL be to find a record where: start_date < today <= end_date Thanks, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php