I would agree that the best solution (as one has already chimed in as having the same problem with the same host) if staying with this host would be to get the server settings fixed. The best solution for you as a store operator is to find someone that supports ZC/doesnt have this issue.
With regards to a solution associated with staying with this host in absence of them resolving the above issue, I've been looking for a post DrByte made about I think it was Windows servers... Regardless if it was windows or another server, there was something about switching assignments from 0 to null as 0 is a specific "integer" designation, while null is nothing and an auto-increment field should not allow NULL as a value and thus should auto-increment. That said, not including the auto-increment field in the assignment query also would force the auto-increment to occur.
So in this case:
Code:
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (0,
'" . (int)$products_id . "',
'" . (int)$options_id . "',
If it were modified to:
Code:
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
values (
'" . (int)$products_id . "',
'" . (int)$options_id . "',
Removing reference to: products_attributes_id
The problem would not exist in thisquery, but other related queries would also need to be modified.
Bookmarks