List:General Discussion« Previous MessageNext Message »
From:Косов Евгений Date:March 7 2006 12:43pm
Subject:Re: selecting records newer than say 20 min
View as plain text  
Hi, Gregory

Hmm.. I think you just should add something like 'create_time > 
DATE_SUB(NOW(), INTERVAL 20 MINUTE)' to a where clause of your query. Or 
something similar..

You can find more at 
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html.

Also consider creating of an index on your timestamp field, if your 
table is large.


> Hi
> What, is the easest way to select all the records created in the last 20 min
> stay based on a column that has a timestamp record.
> 
> Many Thanks
> 
> --
> Gregory Machin
> greg@stripped
> gregory.machin@stripped
> www.linuxpro.co.za
> www.exponent.co.za
> Web Hosting Solutions
> Scalable Linux Solutions
> www.iberry.info (support and admin)
> 
> +27 72 524 8096
Thread
selecting records newer than say 20 minGregory Machin7 Mar
  • Re: selecting records newer than say 20 minMarco Simon7 Mar
  • Re: selecting records newer than say 20 minКосов Евгений7 Mar
  • Re: selecting records newer than say 20 minMartijn Tonies7 Mar
    • Re: selecting records newer than say 20 minGregory Machin7 Mar