Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL 5 error


jasonabc

Recommended Posts

Got the latest versions of OSC, PHP, MySQL and Apache running and am getting this 1264 error all over the place. I eventually found the solution on the Zen Cart forums as there was nothing on the OSC ones. Thought I'd post here as it's a MySQL config issue - not a PHP one.

 

You will see the 1264 error a lot in OSCommerce if MySQL 5 is set to run in STRICT mode. This can be turned off by opening my.ini in the MySQL folder (C:/Program Files/MySQL....) and commenting out the following line:

 

# sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION"

Link to comment
Share on other sites

  • 2 months later...
Got the latest versions of OSC, PHP, MySQL and Apache running and am getting this 1264 error all over the place. I eventually found the solution on the Zen Cart forums as there was nothing on the OSC ones. Thought I'd post here as it's a MySQL config issue - not a PHP one.

 

You will see the 1264 error a lot in OSCommerce if MySQL 5 is set to run in STRICT mode. This can be turned off by opening my.ini in the MySQL folder (C:/Program Files/MySQL....) and commenting out the following line:

 

# sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_E NGINE_SUBSTITUTION"

Thanks jasonabc. That solves the issue of inserting an empty string into an integer column in MYSQL5 and hence removes 1264 errors. However, it doesn't solve the issue of inserting an empty string into a decimal column. Hence the 1366 errors still remain. E.g. in OSC, when you add a product without a weight, the following error occurs:

'1366 - Incorrect decimal value: '' for column 'products_weight' at row 1'.

 

Ryan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...