updating keywords directly in php ?

jbravo

Joined: 2008-10-13
Posts: 7
Posted: Wed, 2009-10-21 10:49

Hi,

Short story - i've tried updating the keywords for a picture directly in phpMyAdmin - the gallery does not seem to pick that up - any hints ?

Long story - i'm trying to use SQL queries to populate the g2_Item.g_keywords field for all pictures, so each picture would use the keywords given for it's parent album.

I thought i'd write some SQLs to extract the keywords of an album and set them for all members of the album. While that worked fine, i'm noticing the Gallery seems to ignore the keywords (when set with phpMyAdmin).

i've taken a dump of the DB before and after setting keywords using "Edit photo" and i've seen several tables being updated, but the only relevant field seems the one in g2_Item. Can anyone help, or perhaps come up with other options ?

Many thanks

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.1 cgi
Webserver = Apache
Database = mysqli 5.0.45-log, lock.system=flock
Toolkits = ArchiveUpload, ImageMagick
Acceleration = none, none
Operating system = Linux cgi0509.int.bizland.net 2.6.30.6 #1 SMP Mon Sep 14 16:36:43 EDT 2009 i686
Default theme = carbon

Login or register to post comments
jbravo

Joined: 2008-10-13
Posts: 7
Posted: Sun, 2009-10-25 22:06

I understand nobody has tried updating the mySQL tables directly ? :)

then maybe you have other suggestion on how to mass-edit the keywords associated to all the pictures in an album (besides using the slow "Edit Captions") ?

Thanks

Login or register to post comments
alecmyers

Joined: 2006-08-01
Posts: 3371
Posted: Sun, 2009-10-25 22:57
Quote:
Short story - i've tried updating the keywords for a picture directly in phpMyAdmin - the gallery does not seem to pick that up - any hints ?

In general, if you muck about with the database directly you need to flush the database cache manually.

Login or register to post comments
jbravo

Joined: 2008-10-13
Posts: 7
Posted: Wed, 2009-10-28 12:27

Indeed, i tried flushing the DB cache after editing the fields in phpAdmin and that did the trick :-)

Thanks for the hint !

Login or register to post comments