Re: DB Date check !!

From: Date: Tue, 31 Jul 2001 13:52:22 +0000
Subject: Re: DB Date check !!
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-8592@lists.php.net to get a copy of this message
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 -=-
mike@mikeflynn.net 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.

« previous php.windows (#8592) next »