I seem to have run into another problem with a query that I am doing exactly like the example in the MySQL documentation, I think. The following query is not working on my PHP page, and it is not working from a MySQL command line either. This looks exactly the same as an example in the MySQL documentation though. Thanks in advance for the help again.
SELECT * FROM oncall WHERE TO_DAYS(NOW()) - TO_DAYS(ptime) <= 3 This is the query that I am ultimately after: SELECT * FROM oncall ORDER BY 'ptime' ASC WHERE TO_DAYS(NOW()) - TO_DAYS(ptime) <= 3 I am trying to display all of the records from the past three days. This looks like the way to go about doing this, but if there is a better way please let me know. (Just as more info, the 'ptime' field is a datetime type of field.) Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php