Post by magzen » Sun Nov 13, 2016 2:27 pm

Hello

I have deleted all categories and products from Opencart and will fill with new ones, but i want to reset the id counter back to 0 in the DB if someone knows how

Thanks

My Opencart Stores
http://www.crea-diem.com
http://www.bazaargadgets.com


Active Member

Posts

Joined
Tue Jun 05, 2012 7:04 pm


Post by thekrotek » Sun Nov 13, 2016 5:42 pm

There's a simple query for that:

Code: Select all

ALTER TABLE category AUTO_INCREMENT = 1
ALTER TABLE product AUTO_INCREMENT = 1
Don't forget to add DB prefix to table names, if you have one.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by magzen » Sun Nov 13, 2016 7:52 pm

thekrotek wrote:There's a simple query for that:

Code: Select all

ALTER TABLE category AUTO_INCREMENT = 1
ALTER TABLE product AUTO_INCREMENT = 1
Don't forget to add DB prefix to table names, if you have one.
thanks alot appreciated :)

My Opencart Stores
http://www.crea-diem.com
http://www.bazaargadgets.com


Active Member

Posts

Joined
Tue Jun 05, 2012 7:04 pm

Who is online

Users browsing this forum: No registered users and 29 guests