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: SQL Query to Title or Re-Title all Images in a Given Album  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

Brooklyn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
SQL Query to Title or Re-Title all Images in a Given Album
« on: April 17, 2012, 04:47:04 am »

If I wanted to run a query to title all uploaded images in a given album to the same phrase, what would the proper SQL query be?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: SQL Query to Title or Re-Title all Images in a Given Album
« Reply #1 on: April 17, 2012, 11:34:03 am »

Code: [Select]
UPDATE cpg15x_pictures SET title = 'new title' WHERE aid = '<enter album ID here>'
Logged

Brooklyn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: SQL Query to Title or Re-Title all Images in a Given Album
« Reply #2 on: April 17, 2012, 02:36:35 pm »

Perfect, thank you.

Would this work for the descriptions as well?

Code: [Select]
UPDATE cpg15x_pictures SET caption = 'new description' WHERE aid = 'Album ID';
Logged

Brooklyn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: SQL Query to Title or Re-Title all Images in a Given Album
« Reply #3 on: April 17, 2012, 02:44:52 pm »

It does. Solved.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.