Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 09:34:02 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Bulk add keywords via PhpMyadmin?  (Read 493 times)
0 Members and 1 Guest are viewing this topic.
Daethian Topic starter
Coppermine novice
*
Gender: Female
United States United States

Posts: 27

I know just enough to be dangerous!


WWW
« on: July 27, 2008, 06: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
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #1 on: July 27, 2008, 07:03:38 pm »

If you don't have any existing keywords then use

Code:
UPDATE cpg_pictures SET keywords = 'foo' WHERE aid = 123;

If you want to add to a set of existing keywords use

Code:
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

I don't care about what they say, I won't live or die that way.
Daethian Topic starter
Coppermine novice
*
Gender: Female
United States United States

Posts: 27

I know just enough to be dangerous!


WWW
« Reply #2 on: July 27, 2008, 07:32:01 pm »

Thanks so much! I'll give it a shot Smiley
Logged

"How naked?
4th base naked."
Daethian Topic starter
Coppermine novice
*
Gender: Female
United States United States

Posts: 27

I know just enough to be dangerous!


WWW
« Reply #3 on: July 27, 2008, 07: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
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.098 seconds with 17 queries.