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: Bulk add keywords via PhpMyadmin?  (Read 2289 times)

0 Members and 1 Guest are viewing this topic.

Daethian

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 27
  • I know just enough to be dangerous!
    • Foreverpurple
Bulk add keywords via PhpMyadmin?
« on: July 27, 2008, 07:54:31 pm »

I don't know much about editing tables but I know it can be done.  I have one set of keywords I would like to add to an entire album. Instead of doing it through the gallery itself it seems like it would go faster to use PhpMyAdmin and insert.  Is this possible and would someone be willing to help me with the proper syntax for accomplishing this? My SQL version: 4.1.22-standard

Logged
"How naked?
4th base naked."

Nibbler

  • Guest
Re: Bulk add keywords via PhpMyadmin?
« Reply #1 on: July 27, 2008, 08:03:38 pm »

If you don't have any existing keywords then use

Code: [Select]
UPDATE cpg_pictures SET keywords = 'foo' WHERE aid = 123;
If you want to add to a set of existing keywords use

Code: [Select]
UPDATE cpg_pictures SET keywords = CONCAT(keywords, ' ', 'foo') WHERE aid = 123;
Change cpg to the prefix you use, foo to the keywords (space separated) and 123 to the album number.
Logged

Daethian

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 27
  • I know just enough to be dangerous!
    • Foreverpurple
Re: Bulk add keywords via PhpMyadmin?
« Reply #2 on: July 27, 2008, 08:32:01 pm »

Thanks so much! I'll give it a shot :)
Logged
"How naked?
4th base naked."

Daethian

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 27
  • I know just enough to be dangerous!
    • Foreverpurple
Re: Bulk add keywords via PhpMyadmin?
« Reply #3 on: July 27, 2008, 08:38:43 pm »

It worked!! Thanks again so much you have made my life so much easier!!!  *happy dance*
Logged
"How naked?
4th base naked."
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.