ColdFusion Programmer wrote:
> Hi Jochem, Can you explain what the where statement in your code
> does, I don't understand the the "EXTRACT(DAYS FROM
> CURRENT_TIMESTAMP - DateTime) < 7" bit
Read it inside out:
CURRENT_TIMESTAMP -> the current date and time, 'now'
DateTime -> your field with the moment of the search, 'then'
CURRENT_TIMESTAMP - DateTime -> the interval between now and then
EXTRACT(DAYS FROM ..) -> the number of whole days in that interval
So what it says is that DateTime should be less than 7 days in the
past in standard SQL syntax. If your database does not support
standard SQL syntax, you might have to rewrite it in something your
database understands, but that should be explained in the manual.
Jochem
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- SQL Statement help! Allan Clarke
- Re: SQL Statement help! Jochem van Dieten
- Re:SQL Statement help! ColdFusion Programmer
- Re:SQL Statement help! Jochem van Dieten
- Re:SQL Statement help! ColdFusion Programmer
- RE: SQL Statement help! Tony Weeg
- Re:SQL Statement help! ColdFusion Programmer
- RE: SQL Statement help! Tony Weeg
- RE: SQL Statement help... Tony Weeg
- RE: SQL Statement help... Jochem van Dieten
- RE: SQL Statement help... Jochem van Dieten
- RE: SQL Statement help... Tony Weeg
- RE: SQL Statement help... Tony Weeg
- RE: SQL Statement help... Jochem van Dieten