4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: airphoto on March 06, 2003, 03:03:27 PM
-
Is it possible to reset the category numbers without disturbing the database?
Having been in development for 6 months now I have deleted a lot of old categories that I no longer need. The numbering is now something like this.
1,4,9,10,12,18,23,24,30. etc.
I would like to be able to renumber them into their logical order again.
-
:( http://4homepages.de/forum/viewtopic.php?t=2269
-
The database tables leverage the auto_increment type available in MySQL for the category numbers. The only way to "renumber" them is to try something like the following:
Export all tables and data.
Hand edit the table data in the exported file. Affected tables are: 4images_categories, 4images_groupaccess, 4images_images, 4images_images_temp
Import the tables and data[/list:u]
phpMyAdmin is one of the best tools to use to import/export although it should be possible to use the database backup/restore in the admin control panel too.
As you can see, all that hand editing can be prone to error so BE CAREFUL and always, always, ALWAYS keep a backup copy.
-
Thank you.