Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / 1062 Duplicate entry '2147483647' for key 1

1062 Duplicate entry '2147483647' for key 1

Locked

Views: 7,538

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
27 Mar 2008, 4:12 PM
#1
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

1062 Duplicate entry '2147483647' for key 1

Can anyone please help exlain wtf I am doing wrong.

We have Zen Cart v1.3.8a/v1.3.8
FireFox also seems to think it is up to date.

Our only add-on is Easy Pop & PayPal

We also seem to have lost the ability to use Easy Pop are well - but I realize I need to get help on this in another place.

1062 Duplicate entry '2147483647' for key 1
in:
[insert into zen_products (products_quantity, products_type, products_model, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_image, products_date_added, master_categories_id) values ('5', '1', '0972125302', '30', null, '.5', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '1', '2', '2', '0', '0', '0', 'More-TapCr-Cvr-600x800.gif', now(), '93')]
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.
<<<<<

Thank you for any possible help.

27 Mar 2008, 8:59 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '2147483647' for key 1

"where" are you seeing this?

28 Mar 2008, 3:34 PM
#3
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

DrByte:

"where" are you seeing this?

My Apology for incomplete info - I should know better.

First, NO fields were left blank,

And I do understand that most of the above is simply restating what was sent.

This is appearing AFTER entering NEW product info,

Preview

Update.

Thank you for any help or suggestions you may have to offer (well any except delete and start the entire site over)

Wheat
http://www.itsalljuststring.com

28 Mar 2008, 5:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '2147483647' for key 1

2147483647 is a very high number ... Is that how high your product ID numbers are?

28 Mar 2008, 6:08 PM
#5
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: 1062 Duplicate entry '2147483647' for key 1

2147483647 also is the max MySQL INT.

28 Mar 2008, 6:29 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1062 Duplicate entry '2147483647' for key 1

paulm:

2147483647 also is the max MySQL INT.

Exactly what I was thinking :smile:

29 Mar 2008, 8:59 AM
#7
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: 1062 Duplicate entry '2147483647' for key 1

Yeah I guessed you did. I did not know it, but could not resist to google for "2147483647" and "mysql" after your first reply :D
(and 2147483647 looked like 2^x -1 :smartalec:)

Edit: and the product_id numbers at the itsalljuststring.com site indeed are very high.

29 Mar 2008, 1:09 PM
#8
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

That is the number ZenCart seemed to want to use.

I was gut-guessing that might be the situation.

perhaps I can fool the system by creating lower numbers and uploading products via EZ pop.

I will let you know what happens.

If that does not work I guess we are going to have to revisit our item numbering scheme

Thank you for your ideas and input, I will let you know what happens "next"

Wheat
suspecting at the answer may turn out to be the dreaded "start over" and no UPC or ISBN for product/item numbers

29 Mar 2008, 1:18 PM
#9
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

paulm:

Yeah I guessed you did. I did not know it, but could not resist to google for "2147483647" and "mysql" after your first reply :D
(and 2147483647 looked like 2^x -1 :smartalec:)

Edit: and the product_id numbers at the itsalljuststring.com site indeed are very high.

  1. is there anyplace in the docs that I "should have" read this information

  2. is there a way to delete ONLY Product and Category records with the idea of restarting the numbers (this time NOT using UPC or ISBN for Item/Product Numbers)

  3. If I use UPC/ISBN in MODEL, are there similar restrictions to cause the remainder of my previously blonde, now gray and rapidly being pulled out hair to completely disappear

Again, my thanks for your help I suspect I may be buying POTS of coffee before this adventure is over <G>

Wheat

29 Mar 2008, 1:33 PM
#10
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: 1062 Duplicate entry '2147483647' for key 1

wheat:

  1. is there anyplace in the docs that I "should have" read this informationI don't think so. The products_id is an autoincrement field. Normally it starts at 1 when you enter your first product and after adding 2147483647 products you run out of available products_id's.

Not sure what caused the high number in your case, I assume you have not added 2147483647 products. Also not sure what the best solution is.... :unsure:

edit: maybe changing the field form INT to BIGINT is an easy fix. But it might also be a very bad idea!

29 Mar 2008, 2:26 PM
#11
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

paulm:

I don't think so. The products_id is an autoincrement field. Normally it starts at 1 when you enter your first product and after adding 2147483647 products you run out of available products_id's.

Well at Least I feel better knowing it was not a failure to RTFM (read the FINE manual)

Not sure what caused the high number in your case, I assume you have not
added 2147483647 products.

I am about 99.99% sure that the use of UPC and ISBN as product no via Eazy Populate is at the heart of this. Not sure where this might be useful to post to avoid it happening to someone else, but did take a minute to send it off to the Book guy

also not sure what the best solution is.... :unsure:

edit: maybe changing the field form INT to BIGINT is an easy fix. But it might also be a very bad idea!

I will wait a few more days, in case anyone has a potentialy less dangerous suggestion

But if it works great, if not then it won't be any worse than having to "start over" from scratch.

Thank you for the suggestions.

Wheat

29 Mar 2008, 3:17 PM
#12
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: 1062 Duplicate entry '2147483647' for key 1

Given it another thought and I think it's much better to try to reset the products_id somehow. Although that has disadavdantages too if it's a live shop (links to products change, google etc).

I will wait a few more days, in case anyone has a potentialy less dangerous suggestion:yes:

30 Mar 2008, 1:38 PM
#13
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

paulm:

Given it another thought and I think it's much better to try to reset the products_id somehow. Although that has disadavdantages too if it's a live shop (links to products change, google etc).

:yes:

Well, IAJS is really more like where test ideas rather than on a live site - so I am not as concerned about the SEO implications as I might be.

I am just happy (for the sake of business partner harmony) that it was not a DAK error to begin with.

I will "let you know"

Wheat

1 Apr 2008, 6:07 PM
#14
wheat avatar

wheat

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: 1062 Duplicate entry '2147483647' for key 1

Expect for the part where I was the FOOL or at least the Ignorant Blonde....

This is not an April Fool's story.

But rather how I spent my weekend trying to decide what to do about the Shopping Cart.

Based on information provided in this thread,

http://www.zen-cart.com/forum/showthread.php?t=92749

I was pretty convinced that it was going to be necessary to "start over".

However, after searching around the Community support forums, I found this seemingly unrelated thread

http://www.zen-cart.com/forum/showpost.php?p=235363&postcount=2

It "seemed" to me, that IF the problem was in fact the Product ID numbering,

Then IF I could reset Product ID's and then Reload using Lessons Learned
to avoid a repeat of the error again....

It was worth a try. The worst that could happen is I would have to "start over" and that was already a "real" possibility.

I am happy to say that it does seem to have worked and I will now be spending the next few days, rethinking my product ID numbering plans, and using Easy Populate to Reload.

Still VERY VERY annoyed over the lack of information that could have helped me to avoid the problem in the first place - NOT with ZenCart - learning curves are part of the package when you choose Open Source.

BUT we purchased Easy Populate Advanced JUST to avoid the problems of "no documentation". More about that another day, for now, my recommendation is DON"T Buy it if you are doing so with an expectation of Support beyond excuses for why no support has been forthcoming.

My thanks to all in the forums, who have been so helpful. Guess I need to buy some coffee this week for the Zen Team

Wheat