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
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
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
I think I may have corrupt data. In one of my shopping cart installs,
no orders were getting written to the orders table. Other tables, like the
customers table, were being written to just fine.
In phpMySQL, I ran check, optimize, repair, and analyze on the orders
table, and t
On Jun 7, 2011, at 10:43 PM, Johan De Meersman wrote:
> Where did you find the advice about setting columns NOT NULL?
It took me awhile, but I just found it again, in case anyone is
interested:
http://dev.mysql.com/doc/refman/5.0/en/data-size.html
7.8.1. Make Your Data as Small as Pos
On Jun 7, 2011, at 10:43 PM, Johan De Meersman wrote:
> If that's all you did, you indeed 'removed the default NULL' but did not
> specify another default. Hence, if you don't explicitly specify a value in
> your insert statement, the insert can not happen as the server doesn't know
> what to p
On Jun 6, 2011, at 10:06 PM, Johan De Meersman wrote:
> What exactly do you mean by "removing the NULL default"? Did you set your
> colums NOT NULL?
Yes. That's all I did.
Marc
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://list
Hopefully I won't look like too much of a numbskull here but after
reading some sites on table optimization, I decided to remove the NULL as
default on the fields in my products table. I thought everything went well
until I realized that we hadn't received any orders for 2 days. That's