RE: SELECT records less than 15 minutes old

2011-06-21 Thread Jerry Schwartz
>-Original Message- >From: sono...@fannullone.us [mailto:sono...@fannullone.us] >Sent: Monday, June 20, 2011 6:01 PM >To: mysql@lists.mysql.com >Cc: wha...@bfs.de; Jerry Schwartz >Subject: Re: SELECT records less than 15 minutes old > >On Jun 20, 2011, at 10:11

Re: SELECT records less than 15 minutes old

2011-06-21 Thread walter harms
from:http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html SET GLOBAL time_zone = timezone; from:http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_utc-timestamp * UTC_TIMESTAMP, UTC_TIMESTAMP() I have the same results, according to the docs timezone is the offs

Re: SELECT records less than 15 minutes old

2011-06-20 Thread sono-io
On Jun 20, 2011, at 10:11 AM, Jerry Schwartz wrote: >> You should use UTC time zone or you will run into trouble with DST. >> > [JS] If you do that, you can't use an automatic timestamp field. You have to > set the field yourself. Thanks Walter and Jerry. Is there a way to get

RE: SELECT records less than 15 minutes old

2011-06-20 Thread Jerry Schwartz
>-Original Message- >From: walter harms [mailto:wha...@bfs.de] >Sent: Monday, June 20, 2011 7:07 AM >To: sono...@fannullone.us >Cc: mysql@lists.mysql.com >Subject: Re: SELECT records less than 15 minutes old > > > >Am 19.06.2011 21:06, schrieb sono...@fannull

Re: SELECT records less than 15 minutes old

2011-06-20 Thread walter harms
Am 19.06.2011 21:06, schrieb sono...@fannullone.us: > On Jun 19, 2011, at 11:11 AM, Claudio Nanni wrote: > >> just a quick debug: > > Thanks, Claudio. It turned out to be that NOW() was using the server's > time and my timestamp was based on my timezone. After fixing that, the > SELEC

Re: SELECT records less than 15 minutes old

2011-06-19 Thread sono-io
On Jun 19, 2011, at 11:11 AM, Claudio Nanni wrote: > just a quick debug: Thanks, Claudio. It turned out to be that NOW() was using the server's time and my timestamp was based on my timezone. After fixing that, the SELECT statement works properly. Marc -- MySQL General Mailing List F

Re: SELECT records less than 15 minutes old

2011-06-19 Thread Claudio Nanni
just a quick debug: SELECT time_stamp,DATE_SUB(NOW(), INTERVAL 15 MINUTE) FROM `records` WHERE `order_id` = $order_id order by time_stamp desc limit 10; what do you get? 2011/6/19 > Hi, > >I'm trying to write a statement that will return all records that > match a particular order_id