Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Rename database filepath for certain pictures  (Read 4768 times)

0 Members and 1 Guest are viewing this topic.

l0rdenn0n

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Rename database filepath for certain pictures
« on: December 31, 2007, 03:02:43 pm »

phpmyadmin, hence 'manually'. If you search the board you will find previous posts about this, but you need to run a query like

Code: [Select]
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 :)
« Last Edit: January 02, 2008, 02:23:26 am by Nibbler »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Rename database filepath for certain pictures
« Reply #1 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Rename database filepath for certain pictures
« Reply #2 on: December 31, 2007, 03:58:54 pm »

Thread split from "rename albums folder?"
Logged

l0rdenn0n

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Rename database filepath for certain pictures
« Reply #3 on: December 31, 2007, 07:37:26 pm »

Thanks for the Split, but is does`t help me :o
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Rename database filepath for certain pictures
« Reply #4 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Rename database filepath for certain pictures
« Reply #5 on: January 01, 2008, 05:30:33 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.
Logged

l0rdenn0n

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Rename database filepath for certain pictures
« Reply #6 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.
Code: [Select]
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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Rename database filepath for certain pictures
« Reply #7 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?
Logged

l0rdenn0n

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Rename database filepath for certain pictures
« Reply #8 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

Code: [Select]
UPDATE cpg_pictures SET filepath = 'newpath' WHERE filepath = 'oldpath'
but i must indicate which Pictures i want to change.
Logged

Nibbler

  • Guest
Re: Rename database filepath for certain pictures
« Reply #9 on: January 01, 2008, 09:50:44 pm »

Just add

Code: [Select]
AND aid = 1

to the query.
Logged

l0rdenn0n

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Rename database filepath for certain pictures
« Reply #10 on: January 02, 2008, 02:16:31 am »

Thats it. Thanks a lot ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.