PhilD Posted August 24, 2006 Posted August 24, 2006 When setting up product attributes, Product Options and Product Values appears to work fine, when I go to set the Product attributes, I get the following sql error; 1264 - Out of range value adjusted for column 'products_attributes_id' at row 1 insert into products_attributes values ('', '44', '1', '2', '', '+') [TEP STOP] Any suggestions? Thanks.
PhilD Posted August 25, 2006 Author Posted August 25, 2006 I think I see the problem in products_attributes.php 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) . "')"); The first value is blank and MySQL 5 does not like that. The field products_attributes_id is the primary key and auto increment. My sql skills are pretty much non existent, anyone know a fix for this? Thanks
PhilD Posted August 25, 2006 Author Posted August 25, 2006 I think I figured it out, or at least it now works as far as I can see. For anyone else with the problem I replaced the empty products_attributes_id with null as follows; 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) . "')");
Recommended Posts
Archived
This topic is now archived and is closed to further replies.