date('Y-m-d') is how MySQL likes to see DateTime types represented.
$today = date('Y-m-d');
$query = 'SELECT * FROM tblEvents ';
$query .= "WHERE dtmEventDate >= $today ";
$query .= 'ORDER BY dtmEventDate DESC';
$result = mysql_query($query);
...etc...
Hope that helps.
-Mike
At 10:26 AM 7/31/2001 +0200, you wrote:
>Hi,
>
>I want to check the date of numerous records in many DB tables, I have tried
>using the
>date (Ymd); function but it doesn't appear to work, not sure whats going
>wrong.
>
>I set a variable based on this function and use this variable within the
>select statement!
>Anyone know whats happening or if there is a descent solution available?
>
>thanks,
>
>Andrew
-=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood *
American schoolchildren today are taking four times as many
psychiatric meds as all of the rest of the world combined.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]