[Solved]: MySQL Query Question [Solved]: MySQL Query Question
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: MySQL Query Question

Started by Superficial Gallery, April 18, 2009, 09:00:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Superficial Gallery

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!

Nibbler

Fairly simple:

UPDATE cpg_pictures SET caption = 'X' WHERE aid = 1
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.

Superficial Gallery

You rock more than mount everest.  Thanks!