Try this:

SELECT * FROM t
where TimeCol < date_sub( now(), INTERVAL x SECOND )

Dan


On 7/7/06, Chris W <[EMAIL PROTECTED]> wrote:
It's late and I just gave up reading the manual.  Can someone please
tell me the easiest way to do a query that will return all rows with a
time stamp that is X number of seconds older than the current time?
Something like this.....

SELECT * FROM t
WHERE TimeCol < (now() - 60*60*24*3)

Yes I know that is just 3 days but other times I will want to find
records that are a few hours old so I like using the formula.

--
Chris W
KE5GIX

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to