>-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
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
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
>-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
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
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
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
Hi,
I'm trying to write a statement that will return all records that match
a particular order_id and that have a timestamp within the last 15 minutes. I
thought that this should work:
SELECT * FROM `records` WHERE `order_id` = $order_id AND (`time_stamp` >=
DATE_SUB(NOW(), INTERVAL 1