PDA

View Full Version : Reset categories to 1? (or initial value)


derevaun
03-31-2005, 05:32 AM
On my site (http://asiftosay.com) I've figured out a way to require a separate description file for each category on the archive page. My plan is to describe my junky cameras before the thumbnails, and maybe the same for films (camera and film are my only two kinds of categories). I just make the required file match a string built from the get property. They all currently just say "images in this category."

My problem is that I keep rearranging the categories to accomodate stuff I forgot to include, and I want to keep the camera before the film in the photo image section. So I have to delete all the categories, add new ones and then re-assign them to photos.

Is there an easier way? Can I use something like PHPMyAdmin to reset the categories to 1 and do it right for good this time? Thanks!!!

blinking8s
03-31-2005, 06:05 AM
you can clear out the tables using phpmyadmin...resetting the id values. Its not advised though...comments and other various parts of the photoblog are dependent on the image id

Rob
03-31-2005, 12:28 PM
If you just want to reset the categories, in phpMyAdmin run the SQL

UPDATE pixelpost_pixelpost SET category='1'

This will reset all of your photos to point to category 1. You will then probably want to clean out your category table by using the empty (not drop) command which will reset the autoincrement value. You can then add category 1 using phpMyAdmin or the admin interface of pixelpost.

NOTE: This will not work on version 1.4 or if you have the multi-category mod installed.