Forums / Setting Up Categories, Products, Attributes / new products are always coming up product_id = 0

new products are always coming up product_id = 0

Locked

Started by jeffmic on 26 Oct 2006, 2:27 AM · Views: 2,138

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
26 Oct 2006, 2:27 AM
#1
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

new products are always coming up product_id = 0

A while back, after clearing out mySQL, I tried entering products from the admin. They get messed up with product_id = 0.

I have to go into the database and change the 3 tables for products so that product has another product ID number.

Is there a way to fix this problem for good without erasing my database?

thanks,
Jeff Michaels

Jeff Michaels,
pres of Musical Creations Ltd.

26 Oct 2006, 2:58 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: new products are always coming up product_id = 0

Did you break or otherwise remove the autoincrement on the products table?

Many of the tables have autoincrements on them and imports, exports, emptying tables in unplanned manners etc. will damage this from time to time ...

Look at the /zc_install/sql/db_rebuild_autoincrement.sql

This should rebuild these for you ...

WARNING: Always make a backup before attempting this ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Oct 2006, 3:30 AM
#3
jeffmic avatar

jeffmic

Zen Follower

Join Date:
Aug 2006
Location:
North Carolina
Posts:
280
Plugin Contributions:
0

Re: new products are always coming up product_id = 0

yep, that fixed it. thanks

Will this mess up my importing directly into mySQL now? Bypassing the admin.
Will it renumber my importing of preselected id's from my office database?
(I hope not.....)

thanks,
Jeff

Jeff Michaels,
pres of Musical Creations Ltd.

20 Dec 2006, 4:39 PM
#4
rmjr avatar

rmjr

New Zenner

Join Date:
May 2005
Posts:
48
Plugin Contributions:
0

Re: new products are always coming up product_id = 0

Thanks! I had this happen before and I forgot how to fix it. All I did was change the extra field in the products table on product_id to auto_increment and everything worked.