coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: l0rdenn0n on December 31, 2007, 03:02:43 PM

Title: Rename database filepath for certain pictures
Post by: l0rdenn0n on December 31, 2007, 03:02:43 PM
Quote from: Nibbler on June 11, 2007, 01:24:47 AM
phpmyadmin, hence 'manually'. If you search the board you will find previous posts about this, but you need to run a query like

UPDATE cpg_pictures SET filepath = 'newpath' WHERE filepath = 'oldpath'

If you are not familiar with phpmyadmin make a backup of the table first.

Hello,

how can i change the database filepath for certain pictures ? The best would be the "aid table", because they`re over 40000 Pictures :)
Title: Re: Rename database filepath for certain pictures
Post by: Hein Traag on December 31, 2007, 03:16:51 PM
Pls do not hijack other threads to ask questions. It is better to start your own thread.
Title: Re: Rename database filepath for certain pictures
Post by: Joachim Müller on December 31, 2007, 03:58:54 PM
Thread split from "rename albums folder? (http://forum.coppermine-gallery.net/index.php?topic=44404.0)"
Title: Re: Rename database filepath for certain pictures
Post by: l0rdenn0n on December 31, 2007, 07:37:26 PM
Thanks for the Split, but is does`t help me :o
Title: Re: Rename database filepath for certain pictures
Post by: Hein Traag on January 01, 2008, 09:29:02 AM
It does help the forum in general by not cluttering someone elses thread. If you have a problem and seek answers on the forum then please start your very own thread. This keeps it al nice and tidy and easier for supporters to give support to the right persons.

Cheers
Hein
Title: Re: Rename database filepath for certain pictures
Post by: Joachim Müller on January 01, 2008, 05:30:33 PM
Quote from: l0rdenn0n on December 31, 2007, 03:02:43 PM
how can i change the database filepath for certain pictures ? The best would be the "aid table", because they`re over 40000 Pictures :)
Use phpMyAdmin to accomplish this. Post details for details.
Title: Re: Rename database filepath for certain pictures
Post by: l0rdenn0n on January 01, 2008, 06:13:39 PM
ok again :)

I want to change with phpMyAdmin the filepath for all Pictures of the "aid table" example "52". I think is easier as the "pid table", because they`re over 40000 Pictures.

UPDATE cpg_pictures SET filepath = 'newpath' WHERE filepath = 'oldpath'


Thats the query, but with this i change the filepath for all Pictures. So what is missing ?  ;D
Title: Re: Rename database filepath for certain pictures
Post by: Joachim Müller on January 01, 2008, 06:26:27 PM
What's an "aid table"? What's a "pid table"? How do the pics differ, i.e. what could be added to the query in the WHERE segment?
Title: Re: Rename database filepath for certain pictures
Post by: l0rdenn0n on January 01, 2008, 06:58:10 PM
Ok here is an image.

I want to change the filepath for all Pictures in the "aid" table (or whatever that is called) nr. 1 for example.

I think i have to use the query

UPDATE cpg_pictures SET filepath = 'newpath' WHERE filepath = 'oldpath'

but i must indicate which Pictures i want to change.
Title: Re: Rename database filepath for certain pictures
Post by: Nibbler on January 01, 2008, 09:50:44 PM
Just add


AND aid = 1


to the query.
Title: Re: Rename database filepath for certain pictures
Post by: l0rdenn0n on January 02, 2008, 02:16:31 AM
Thats it. Thanks a lot ;)