Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1264 - Out of range value


jasonabc

Recommended Posts

Hi,

 

Just upgraded from MySQL 4 to 5 and am getting this error when I try and update a product in Admin and no manufacturer is selected:

 

1264 - Out of range value adjusted for column 'manufacturers_id' at row 1

 

If a manufacturer *is* selected it's fine. A search of the forums for this message drew a blank (surprisingly). Anyone come across this before?

 

cheers

 

Jason

Link to comment
Share on other sites

nope, have not seen it, from what to what was the value changed?

 

did have a problem on decimal count before, int(5,4) was first interpreted as 5 before comma and 4 after, and now is 5 numbers in total, so 12,3456 used to be fine now became 9,9999 as output.

Link to comment
Share on other sites

Idid find this so appears to be a bug:

 

http://bugs.mysql.com/bug.php?id=11546

 

I have the exact same store running locally at home on MySQL 4 and it's fine. This machine is running MySQL 5 and only here do I get the problem.

 

Sounds like the bug has been patched so I'll download the latest MySQL 5 version and see if that fixes it.

Link to comment
Share on other sites

nope - no effect. Same problem. Tried on a fresh install of OSC (osCommerce 2.2 Milestone 2 Update 060817) running on the latest version of MySQL (5.0.27) and I still get this error message if a product is added or edited and no manufacturer is selected (manufacturer dropdown is set at 'none'):

 

1264 - Out of range value adjusted for column 'manufacturers_id' at row 1

 

Anyone??

Link to comment
Share on other sites

Ok I seem to have fixed it. The problem stems from the fact that the 'none' option in the manufacturer dropdown does not have a value (the HTML displays value=""). MySQL will not take a NULL value in this column.

 

Open /admin/categories.php and change this:

 

$manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));

 

to this:

 

$manufacturers_array = array(array('id' => '0', 'text' => TEXT_NONE));

 

Seems to have done the trick. Am posting the solution in case anyone else comes across this problem.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...