Thread: Category IDs

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    39
    Plugin Contributions
    0

    Default Category IDs

    I did some series of tests with fake categories to get a feel.. Now i'm ready to start and create my real categories.. How can I reset the db so that when i add the first category it starts with ID 1 and not 19.. I've gone through the DB and cant find anything that's making it start at 19.. The Categories and Categories_Description tables are empty..

    TIA

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Category IDs

    Because these IDs need to be unique, they are set to auto increment in the database. The current auto increment value is held internally and applied by MySQL.

    You can reset it by either deleting and re-creating tables or marginally less radically by using the MySQL truncate command. Both of these however would require that you have a fairly good understanding of how your categories and products tables are linked to other tables and that you make sure that all linked tables are treated in the same way, otherwise you could seriously screw up your database. This wiki entry might help.

    However, there's no real harm in having IDs that don't start at one, so why take this risk?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Reset prod IDs and Categories IDs
    By savchenko01 in forum General Questions
    Replies: 2
    Last Post: 31 Jan 2011, 05:21 PM
  2. Category Tree w/ Prouduct IDs (easy linking)
    By vatertime in forum General Questions
    Replies: 0
    Last Post: 15 Apr 2010, 05:34 PM
  3. list of shipping IDs?
    By mzimmers in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 11 Apr 2010, 04:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg