Re: get current events from mysql query by date?
| From: | Henrik Hansen | Date: | Mon, 05 Mar 2001 19:49:41 +0000 |
| Subject: | Re: get current events from mysql query by date? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42658@lists.php.net to get a copy of this message | ||
> I have a mysql database of events. It contains the following fields:
>
> - EventID
> - EventName
> - EventDescription
> - EventStartDate
> - EventEndDate
>
> I would like to query the database for the next 5 events from the current
> date (today). Any ideas?
works if EventStartDate is a timestamp (i think)
$strselect = "SELECT EventName FROM table WHERE EventStartDate >
UNIX_TIMESTAMP() LIMIT 5";
if EventStartDate is not a timestamp what is it then?
hope it helps
--
Henrik Hansen