Brunswick Posted April 19, 2007 Posted April 19, 2007 I'm not sure where to look for an answer to this one. I'm just beginning to set up attributes for some of my products and right out of the gate I run into a problem. After I hit "Insert" it goes to the following page: /catalog/admin/products_attributes.php?action=add_product_attributes&option_page=1&value_page=1&attribute_page=1 and then shows the following message: 1264 - Out of range value adjusted for column 'products_attributes_id' at row 1 insert into products_attributes values ('', '36', '6', '15', '1.49', '+') Does anyone have any idea what went wrong? Did I miss a setting in configuration or what? I'm developing this in localhost on my own computer. -Hank :huh:
Jan Zonjee Posted April 19, 2007 Posted April 19, 2007 I'm just beginning to set up attributes for some of my products and right out of the gate I run into a problem. After I hit "Insert" it goes to the following page:and then shows the following message: 1264 - Out of range value adjusted for column 'products_attributes_id' at row 1 insert into products_attributes values ('', '36', '6', '15', '1.49', '+') Does anyone have any idea what went wrong? Most likely a MySQL issue. Try changing line 61 in admin/products_attributes.php from: tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); to: tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); Probably you will be fine after that.
Brunswick Posted April 19, 2007 Author Posted April 19, 2007 Probably you will be fine after that. Hello Jan, Thank you for the input. Promptly made the change you suggested and it did change the error message to: 1054 - Unknown column 'NUL' in 'field list' insert into products_attributes values (NUL, '36', '6', '15', '1.49', '+') I'm not sure what that means but hopefully you do. :) I've not made any alteration to the database that I know, and all the other entries worked fine. :huh: -Hank
Jan Zonjee Posted April 20, 2007 Posted April 20, 2007 Promptly made the change you suggested and it did change the error message to: 1054 - Unknown column 'NUL' in 'field list' insert into products_attributes values (NUL, '36', '6', '15', '1.49', '+') I'm not sure what that means but hopefully you do. :) It means you changed the '' to NUL but it should have been NULL. Very different meaning :)
Brunswick Posted April 20, 2007 Author Posted April 20, 2007 It means you changed the '' to NUL but it should have been NULL. Very different meaning :) Hello Again, You were absolutely right, of course! (Sometimes the little hamster falls asleep at the wheel! :) ) Anyway, making that correction fixed the problem. I'm just getting my feet wet, learning all about the mysteries of MySQL (along with PHP on my own Apache server software) and I did notice while working my way through the MySQL tutorial that where they suggested I should see the value "NULL" it was just blank. Since this did not affect anything, I ignored it but I thought it might have something to do with different versions of the MySQL server. Anyway, thank you very much for your help and your good humor. :thumbsup: -Hank
edmoore1 Posted July 7, 2007 Posted July 7, 2007 I am getting a similar error on the categories.php page. 1264 - Out of range value adjusted for column 'sort_order' at row 1 insert into categories (sort_order, parent_id, date_added) values ('', '0', now()) [TEP STOP] I have done similar changes to the code as you recommended, with no results. Any ideas?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.