On Sat, 06 Apr 2002 22:56:11 -0500, Chuck \"PUP\" Payne wrote:
>Hello again,
>
>I am trying to set up a SQL statement using NOW(), what I am wanting
>to do
>is to use NOW() then do a search on any date less than 7 days.
>Before I get
>several e-mails asking why. I am trying to a news base database for
>the
>company intranet and I am wanting to only show newsitems that are 7
>days or
>less. And I want NOW() to set today date and then go back as far as
>seven
>days. But I am not sure now to use < less than in my statement with
>NOW(),
>or if it will work.

you could try
select someStuff where someOtherDate > date_sub(now(), interval 7 day)

-z


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to