View Full Version : auto_inc query??
Joe Gronlund
Mon 1st Sep '03, 12:30pm
what query would i run on my database to reset the forum IDs and Member IDs back to 0 or 1??
TIA
Joe
Riklund
Mon 1st Sep '03, 12:42pm
I'm not sure that you can just reset that data without deleting everything in the table, but this is the query that can be used to reset the id and remove all data in that table.
TRUNCATE table
MUG
Mon 1st Sep '03, 12:43pm
ALTER TABLE table AUTO_INCREMENT=1;
But there can't be any conflicting keys, so you would have to empty the table first.. why do you want to do this?
Joe Gronlund
Mon 1st Sep '03, 1:39pm
ALTER TABLE table AUTO_INCREMENT=1;
But there can't be any conflicting keys, so you would have to empty the table first.. why do you want to do this?thats basically what i wanna do, just wipe some table right out so that when i recreate something in that table, its userID will be 1,2,3 etc
Hi, thanks for your help;
when i ran that query i received this error
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/cellular/public_html/forum/includes/db_mysql.php on line 279
-------------edit found the query -------------
its
ALTER TABLE tablename AUTO_INCREMENT = 1
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.