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: [Solved]: MySQL Query Question  (Read 1525 times)

0 Members and 1 Guest are viewing this topic.

Superficial Gallery

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
[Solved]: MySQL Query Question
« on: April 18, 2009, 09:00:51 pm »

Hi!

So I have a ton of pics in my installation.  Most of them get added by batch add, which means that I don't have any titles or captions on the pics.  I would like to be able to update them album by album using mysql (phpadmin) but I don't know the syntax.  Like, I want to change all the captions in album 1 to X (they would all be the same) and the same with the titles.

Anyone know the sql code?  I am pretty sure this is the right forum for this - thanks!
« Last Edit: April 18, 2009, 10:56:06 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: MySQL Query Question
« Reply #1 on: April 18, 2009, 09:42:57 pm »

Fairly simple:

Code: [Select]
UPDATE cpg_pictures SET caption = 'X' WHERE aid = 1
Code: [Select]
UPDATE cpg_pictures SET title = 'Y' WHERE aid = 1
change the cpg_ to the prefix you chose during installation. Make a backup of your db before running any manual queries.
Logged

Superficial Gallery

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: MySQL Query Question
« Reply #2 on: April 18, 2009, 10:16:43 pm »

You rock more than mount everest.  Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.