forum.coppermine-gallery.net
Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: MaThIbUs on February 26, 2004, 10:28:57 pm
-
Database Cleanup mod (http://www.mathibus.com/specials/hacks/cpgdbcleanup/)
I welcome your comments and/or suggestions in this thread.
/m_aTh!bUs
-
Can anyone tell me how to alter the AutoIndex value which is in the cpg_pictures MySQL table? Which MySQL query should I run? (It would be handy to include something like that in the mod.)
-
Nice Mod.
Nothing fancy, just handy. I tested it and everything keeps working fine. But will keep my backup for while tough :wink:
A stumbled on this:
As the script rearranges the 'pid' and 'aid'. Pictures will get a different pid. I had set a certain thumb set as an album_thumb So it's stored in mysql. Arranging all the 'pid's' made it show the wrong album_thumb. 'cause the pic.nr. as stated in sql doesn't correspond with the same 'pid' anymore. (It's rearranged remember) It even showed thumbs that weren't in the album at all.
To correct this i had to go by all the albums properties and correct the thumbs.
I don't know if it'll also happens when the album_thumb is set on 'last uploaded', as i didn't have any when a ran dbcleanup.php.
If your album count is low this isn't such a big problem, but as the photoalbum growes, the problem grows too.
-
I see little point in this mod, as I don't care what numbers the PIDs have. If the mod crashes in mid-air, you'll have a problem.
Unless you're some kind of "keeping things nice'n neat fanatic", I recommend not using the mod...
After all, PID's are just numbers in an url...
GauGau
-
Thanks for posting that bug report, Widi. I'll try to fix it asap.
Gaugau: there shouldn't be *any* problem if you create a backup (as stated in the mod readme). I get your point though.
-
Database Cleanup mod v1.1 (http://www.mathibus.com/specials/hacks/cpgdbcleanup/)
Now the only thing I'm looking for is how to alter the AutoIndex value which is in the cpg_pictures MySQL table... Which MySQL query should I run? (It would be handy to include something like that in the mod.)
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fserver6.uploadit.org%2Ffiles%2FMaThIbUs-autoindex.jpg&hash=038e36a55c1911f5ae900a6f4140aa61e6391d1b)
-
Jupz you fixed it. Excellent...
:lol:
PS. GauGau, agreed. It's a cleaning behind the scenes cosmetic thingy.
-
alter table $CONFIG['TABLE_PICTURES'] auto_increment = 0
- should fix that for you.
Incidently there is no need to make your own database connections, init.inc.php already does that (and includes config.inc.php too). Just use db_query() to run your queries directly.
-
Thanks for the info, Nibbler. I use mysql_query(), seems to work fine too. Anyway, with your help I updated the mod to v1.2 (http://www.mathibus.com/specials/hacks/cpgdbcleanup/).
Expect v1.3 real soon, which will use the table names which are stored in the config settings, and not the default names (thanks for that too, Nibbler :)).
-
Database Cleanup mod v1.3 (http://www.mathibus.com/specials/hacks/cpgdbcleanup/)
Much faster than v1.2, fixed some bugs and it now uses the table names which are stored in the configuration settings (instead of the default ones).
-
Excellent,
Works like a charm
:lol:
very nicely done
-
Thanks, Widi :)