Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Attribute Error - 1136 Column count

Attribute Error - 1136 Column count

Locked

Views: 12,297

Results 1 to 20 of 34
This thread is locked. New replies are disabled.
11 May 2006, 12:54 AM
#1
laurelee avatar

laurelee

New Zenner

Join Date:
Apr 2006
Posts:
7
Plugin Contributions:
0

Attribute Error - 1136 Column count

I am attempting to "Copy to Category" in the Attributes Controller for one product's attributes to an entire category. However, everytime I go to Copy, I am getting the following message:

1136 Column count doesn't match value count at row 1
in:
[insert into products_attributes values (0, '1', '1', '1', '0.0000', '+', '1', '1', '0', '+', '0', '0', '1', 'attributes/apple_1001_thb.jpg', '1', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', '0', '0.0000', '0', '0')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I have tried copying to just one product with all options (Delete, Upgrade, or Ignore) and the same error occurs. I was able to succeed in this action about 1 1/2 weeks ago doing the same thing, however, all of a sudden today, it is not working. Any info into why this is happening or what I can do to fix it would be greatly appreciated!

FYI - I am using the latest version of Zen Cart.

11 May 2006, 2:23 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute Error - 1136 Column count

Did you add any add-ons to your shop that would of altered the table structure?

11 May 2006, 8:43 PM
#3
laurelee avatar

laurelee

New Zenner

Join Date:
Apr 2006
Posts:
7
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

I only added the wholesale price add-on that allows me to have many different prices only seen by specific people. I don't believe this should affect the attributes, but I guess I could be wrong :)

12 May 2006, 3:23 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute Error - 1136 Column count

Compare your current structure of your database with the structure of a clean Zen Cart database and see if you suddenly have new fields and such that could be causing this related to attributes ...

22 Aug 2006, 8:39 PM
#5
hrm avatar

hrm

New Zenner

Join Date:
Oct 2005
Posts:
95
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

I have the same problem and yes there are extra fields

In products table:
products_price_w

In products_attributes table:
options_values_price_w

Is there a fix?

Heather

22 Aug 2006, 8:40 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute Error - 1136 Column count

Any idea what add-on you might have installed on your site?

Sounds like perhaps it has altered the code as well as the database ...

22 Aug 2006, 8:46 PM
#7
hrm avatar

hrm

New Zenner

Join Date:
Oct 2005
Posts:
95
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

Dual Pricing

Yes, it did alter the code -- and, incidentally, I'm using 1.2.6d.

Any ideas?

Heather

22 Aug 2006, 9:07 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute Error - 1136 Column count

Perhaps check the threads on that add-on and see what has broken on your site ...

6 Nov 2006, 4:32 AM
#9
boylan avatar

boylan

New Zenner

Join Date:
Sep 2006
Location:
Gillette, NJ, USA
Posts:
35
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

For future reference:

The problem comes because dual prices/wholesale pricing adds a field to the attributes table.

admin/includes/functions/general.php

after line 1914 ish:

          '" . $products_copy_from->fields['options_values_price'] . "',

add:

		  '" . $products_copy_from->fields['options_values_price_w'] . "',

after line 1943 ish:

          options_values_price='" . $products_copy_from->fields['options_values_price'] . "',

add:

		  options_values_price_w='" . $products_copy_from->fields['options_values_price_w'] . "',  
7 Nov 2006, 1:15 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attribute Error - 1136 Column count

Thanks for posting an update to this issue when using those add-ons ...

29 Nov 2006, 6:21 PM
#11
lemuria avatar

lemuria

New Zenner

Join Date:
Aug 2005
Posts:
59
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

I have the dual pricing add-on and I was experiencing this error when copying attributes to another product or a category. I made the fixes to admin/includes/functions/general.php that were suggested by Boylan, and that fixed the problem - I can copy attributes to another product.

However, now I can't add options to an item. I get the following error:

1136 Column count doesn't match value count at row 1
in:
[insert into products_attributes values (0, '237', '71', '0', '0', '+', '0', '1', '0', '+', '0', '0', '1', '', '1', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I attached the products_attributes table to this message:
http://www.zen-cart.com/forum/showpost.php?p=296776&postcount=76

Is there something additional that I need to add to admin/includes/functions/general.php?

29 Nov 2006, 9:03 PM
#12
g0d4lm1ty avatar

g0d4lm1ty

Zen Follower

Join Date:
Sep 2006
Posts:
257
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

i made the changes and i get the same error still ... :(

15 Apr 2007, 12:20 PM
#13
coke119 avatar

coke119

New Zenner

Join Date:
Feb 2007
Location:
Collingwood, Victoria, Australia, Australia
Posts:
2
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

boylan:

For future reference:

The problem comes because dual prices/wholesale pricing adds a field to the attributes table.

admin/includes/functions/general.php

after line 1914 ish:

      '" . $products_copy_from->fields['options_values_price'] . "',
> add:
> ```
          '" . $products_copy_from->fields['options_values_price_w'] . "',

after line 1943 ish:

      options_values_price='" . $products_copy_from->fields['options_values_price'] . "',
>  
> add:
> ```
          options_values_price_w='" . $products_copy_from->fields['options_values_price_w'] . "',  

it works, thank you very much

15 Apr 2007, 12:21 PM
#14
coke119 avatar

coke119

New Zenner

Join Date:
Feb 2007
Location:
Collingwood, Victoria, Australia, Australia
Posts:
2
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

g0d4lm1ty:

i made the changes and i get the same error still ... :(
maybe your version is different, I have tried, it works very well

26 May 2007, 2:08 PM
#15
greatness_183 avatar

greatness_183

New Zenner

Join Date:
May 2007
Location:
Wales
Posts:
28
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

It did not seem to work for me .

so I droped "options_values_price_w" in "products_attributes"

They both seem to work fine now .. but I am still testing
:clap:

26 May 2007, 2:31 PM
#16
greatness_183 avatar

greatness_183

New Zenner

Join Date:
May 2007
Location:
Wales
Posts:
28
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

Ok I take that back .. Not working

29 May 2007, 10:45 AM
#17
greatness_183 avatar

greatness_183

New Zenner

Join Date:
May 2007
Location:
Wales
Posts:
28
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

ok I downloaded "dual pricing_1_3-beta3M"

and reinstalled this and knock on wood it is all working now

made sure i tested for a few days before posting this time .

Hope this helps

2 Jun 2007, 8:52 AM
#18
kudra avatar

kudra

New Zenner

Join Date:
Mar 2007
Posts:
2
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

Thanks for posting this fix, it worked perfectly. Veyr much appreciated by us Newer Zenners :)

19 Jun 2007, 7:58 PM
#19
canemasters avatar

canemasters

Zen Follower

Join Date:
Mar 2007
Posts:
444
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

Do I add the line

" . $products_copy_from->fields['options_values_price_w'] . "',

after the original code,
or do I just add the "_w" to the current code?

19 Jun 2007, 8:15 PM
#20
canemasters avatar

canemasters

Zen Follower

Join Date:
Mar 2007
Posts:
444
Plugin Contributions:
0

Re: Attribute Error - 1136 Column count

Nevermind, I played with it and you have to add it right under the existing code. All is working great!