Results 1 to 7 of 7

Thread: Reseting the Listing ID

  1. #1
    Join Date
    Apr 2004
    Location
    San Diego
    Posts
    32

    Default Reseting the Listing ID

    How can I reset the listing ID on an empty database. I modified the database for a car dealer website. The database had about 60 listings, so I deleted them. Now I am creating a similar website and want to use the same database structure, but none of the records. How can I reset the listing ID so that it's starts from zero or one.
    "My theory is that if you look confident you can pull off anything - even if you have no clue what you're doing…" Unknown

  2. #2
    Join Date
    Feb 2003
    Posts
    237

    Default

    Use phpMyAdmin to dump the database structure, and include the DROP TABLE directive.
    Then run the generated MySQL statements through MySQL, and you'll get clean tables, ready to roll.

    FL

  3. #3
    Join Date
    Apr 2004
    Location
    San Diego
    Posts
    32

    Default Thank you

    Thanks Fat Lizard!, I will go ahead and try that.
    "My theory is that if you look confident you can pull off anything - even if you have no clue what you're doing…" Unknown

  4. #4
    Join Date
    Apr 2004
    Location
    San Diego
    Posts
    32

    Default Still Need Help!

    I tried doing what Fat Lizard suggested, but I still got it wrong. can anybody help me!. all I need is a detail explanation on how to do what Fat Lizard recomended. i.e ( under the structure tab, you click NAME setting, then you do this other step.) something like that. Thank you in advance for your help.
    "My theory is that if you look confident you can pull off anything - even if you have no clue what you're doing…" Unknown

  5. #5
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default

    Run this sql using phpmyadmin.

    DROP TABLE IF EXISTS `default_listingsDB`;
    CREATE TABLE IF NOT EXISTS `default_listingsDB` (
    `ID` int(11) NOT NULL auto_increment,
    `user_ID` int(11) NOT NULL default '0',
    `Title` varchar(80) NOT NULL default '',
    `expiration` date NOT NULL default '0000-00-00',
    `notes` text NOT NULL,
    `creation_date` date NOT NULL default '0000-00-00',
    `last_modified` timestamp(14) NOT NULL,
    `hitcount` int(11) NOT NULL default '0',
    `featured` char(3) NOT NULL default 'no',
    `active` char(3) NOT NULL default 'yes',
    `mlsimport` char(3) NOT NULL default 'No',
    `views` varchar(10) NOT NULL default '0',
    PRIMARY KEY (`ID`),
    UNIQUE KEY `ID` (`ID`),
    KEY `ID_2` (`ID`),
    KEY `idx_mlsimport` (`mlsimport`(1))
    ) TYPE=MyISAM AUTO_INCREMENT=11130 ;

    This should do it.

  6. #6
    Join Date
    Apr 2004
    Location
    San Diego
    Posts
    32

    Default Thank you PBflash!

    Thank you for your quick response. I will go ahead and try this!.
    "My theory is that if you look confident you can pull off anything - even if you have no clue what you're doing…" Unknown

  7. #7
    Join Date
    Apr 2004
    Location
    San Diego
    Posts
    32

    Default It Worked!

    Thank you pbflash, It work great!. I just had to change the number 11130 to 1. Thanks again for your help.
    "My theory is that if you look confident you can pull off anything - even if you have no clue what you're doing…" Unknown

Bookmarks

Posting Permissions

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