chrometweaks.org

Can some one tell about some free iPage web hosting sites?

Click Here To View All Answers...


First of all Can some one tell about some free iPage web hosting sites? Thanks in advance for any answer. 2nd question I got is.. I get the following error when trying to assing attributes to a product.

1136 - Column count doesn't match value count at row 1.

Insert into products_attributes values ('', '1', '1', '1', '', '+').

[TEP STOP].

Does anyone know how I could fix this?.

Thanks!..

Comments (22)

The answer is Yes, although you might want to make sure and wait for another member to confirm this as I am on the fence. Better yet, why don't you ask the iPage guys because they can give you an answer better...

Comment #1

Something might have changed. I had someone add a new contribution for me..

Do you know how I would change the values?..

Comment #2

Which contrib? Did it work when he/she was done or is this the first time you've tried to add an attribute since then?.

Ed..

Comment #3

Open your database via phpmyadmin and then look at the products_attributes table and tell us what fields are in there...

Comment #4

These are the fields of the products attributes table.

Products_attributes_id int(11) No auto_increment Change Drop Primary Index Unique Fulltext.

Products_id int(11) No 0 Change Drop Primary Index Unique Fulltext.

Options_id int(11) No 0 Change Drop Primary Index Unique Fulltext.

Options_values_id int(11) No 0 Change Drop Primary Index Unique Fulltext.

Options_values_price decimal(15,4) No 0.0000 Change Drop Primary Index Unique Fulltext.

Price_prefix char(1) No Change Drop Primary Index Unique Fulltext.

Sort_order int(11) UNSIGNED Yes 0 Change Drop Primary Index Unique Fulltext.

Can anyone tell me what I need to change/delete?.

Thank you!..

Comment #5

This is a new field:.

Sort_order int(11) UNSIGNED Yes 0 Change Drop Primary Index Unique Fulltext.

So you need to add it to the page where the query is being performed from...

Comment #6

Hi,.

I have the same issue.

How Would I Change The Code.

// alternative attribute handling Update Product Attributes.

$rows = 0;.

$options_query = tep_db_query("select products_options_id, products_options_name from "TABLE_PRODUCTS_OPTIONS" where language_id = '"$languages_id"' order by products_options_name");.

While ($options = tep_db_fetch_array($options_query)) {.

$values_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from "TABLE_PRODUCTS_OPTIONS_VALUES" pov, "TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS" p2p where pov.products_options_values_id = p2p.products_options_values_id and p2p.products_options_id = '"$options['products_options_id']"' and pov.language_id = '"$languages_id"'");.

While ($values = tep_db_fetch_array($values_query)) {.

$rows ++;.

$attributes_query = tep_db_query("select products_attributes_id, options_values_price, price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" where products_id = '"$products_id"' and options_id = '"$options['products_options_id']"' and options_values_id = '"$values['products_options_values_id']"'");.

If (tep_db_num_rows($attributes_query) > 0) {.

$attributes = tep_db_fetch_array($attributes_query);.

If ($HTTP_POST_VARS['option'][$rows]) {.

If ( ($HTTP_POST_VARS['prefix'][$rows] <> $attributes['price_prefix']) || ($HTTP_POST_VARS['price'][$rows] <> $attributes['options_values_price']) ) {.

Tep_db_query("update "TABLE_PRODUCTS_ATTRIBUTES" set options_values_price = '"$HTTP_POST_VARS['price'][$rows]"', price_prefix = '"$HTTP_POST_VARS['prefix'][$rows]"' where products_attributes_id = '"$attributes['products_attributes_id']"'");.

}.

} else {.

Tep_db_query("delete from "TABLE_PRODUCTS_ATTRIBUTES" where products_attributes_id = '"$attributes['products_attributes_id']"'");.

}.

} elseif ($HTTP_POST_VARS['option'][$rows]) {.

Tep_db_query("insert into "TABLE_PRODUCTS_ATTRIBUTES" values ('', '"$products_id"', '"$options['products_options_id']"', '"$values['products_options_values_id']"', '"$HTTP_POST_VARS['price'][$rows]"', '"$HTTP_POST_VARS['prefix'][$rows]"')");.

}.

}.

}.

// alternative attribute handling end.

Thanks..

Comment #7

I get the following error when trying to assing attributes to a product.

1136 - Column count doesn't match value count at row 1.

Insert into products_attributes values ('', '1', '1', '1', '', '+').

[TEP STOP].

Does anyone know how I could fix this?.

Thanks!..

Comment #8

Have you modified your database table in any way?..

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.