Re: Possible corrupt data?

2011-06-19 Thread Claudio Nanni
Marc, From what you say it seems a logical problem with your data, And it cannot be corrupted at database level. Check your application logs. You need to know why order does not succeed. Cheers Claudio On Jun 18, 2011 9:52 PM, sono...@fannullone.us wrote: I think I may have corrupt data. In

Re: Optimizing column widths

2011-06-19 Thread Tim Johnson
* Dan Nelson dnel...@allantgroup.com [110618 16:33]: In the last episode (Jun 18), Tim Johnson said: Is there an optimal 'alignment' for column widths for varchar types? I.E., divisible by 8 or 10 or by powers of 2? No. Varchar fields are stored using only as many bytes as are in

SELECT records less than 15 minutes old

2011-06-19 Thread sono-io
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

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 sono...@fannullone.us Hi, I'm trying to write a statement that will return all records that match a

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

calculate the total amount of revenue each month-year

2011-06-19 Thread HaidarPesebe
A02 CODE. Over its support I thank you. Haidapesebe __ Information from ESET NOD32 Antivirus, version of virus signature database 6221 (20110619) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com

Re: calculate the total amount of revenue each month-year

2011-06-19 Thread Aveek Misra
A02 CODE. Over its support I thank you. Haidapesebe __ Information from ESET NOD32 Antivirus, version of virus signature database 6221 (20110619) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- MySQL General Mailing List For list

Re: calculate the total amount of revenue each month-year

2011-06-19 Thread HaidarPesebe
NAME A02 CODE. Over its support I thank you. Haidapesebe __ Information from ESET NOD32 Antivirus, version of virus signature database 6221 (20110619) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32