Mass Update of Keywords - How to? Mass Update of Keywords - How to?
 

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

Mass Update of Keywords - How to?

Started by mirdonamy, August 29, 2008, 12:07:20 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mirdonamy

I have a photo gallery with thousands of photos.  I have two friends who just got married and I want to update their name in my keywords, but doing it one by one is a pain.  I can login to PhpMyAdmin, but I'm not exactly sure how to properly export the cpg_pictures table without messing it up.  There are so many check boxes and options! 

If I export it to sql or csv/excel, I can probably "find / replace" their names and then import the file back to PhpMyAdmin. 

My friend suggested an SQL Query, but also mentioned that it may only work if the Keywords field I'm searching for is exact (which it won't be since I use multiple keywords per photo). 

What advice can you, the experts, give me on the fastest, easiest way to find and replace particular words in the Keyword field of the cpg_pictures table?  I don't want to mess up anything.

PS. I'm not a programmer or coder.  I am just tech savvy enough to follow precise direction :)

Arielle

Joachim Müller

What's wrong with the keyword manager that comes with coppermine: http://yoursite.tld/your_coppermine_folder/keywordmgr.php

Nibbler

UPDATE cpg_pictures set keywords = REPLACE(keywords, 'oldname', 'newname')

Backup first.

Αndré

Quote from: Nibbler on August 29, 2008, 11:50:11 AM
UPDATE cpg_pictures set keywords = REPLACE(keywords, 'oldname', 'newname')

Backup first.
If you use this query, it will replace every matching part.

REPLACE(keywords, 'meier', 'schmidt')
will also replace the "meier" in "kleinmeier", resulting in changing this name to "kleinschmidt".