Re Subject: SQL WHERE datetime > NOW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Presumably where you are generating TO_DAYS(NOW()) you meant to say TO_DAYS(NOW())+1 ? (which is days *after* today !)

Also, you did not specify how it "does not work" - can you be mroe descriptive, what error message did you receive, how many rows did you expect and get out ?

Cheers - Neil.

At 19:29 03/01/2004 +0000, you wrote:
Message-ID: <001201c3d1f5$065c70a0$391c8051@johnc91qo3hbzu>
From: "John Dillon" <ioannes@xxxxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Date: Sat, 3 Jan 2004 12:27:58 -0000
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: SQL WHERE datetime > NOW

I'm trying to limit the results where a datatime field is later than todays date:

WHERE TO_DAYS(NOW())>TO_DAYS(MyTable.myfield)

doesn't appear to work. Should it? Should I not be nesting functions within an SQL statement like
this?


Thanks in advance for any ideas.

John

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux