PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/index.php)
-   General Discussion (http://www.photopost.com/forum/forumdisplay.php?f=68)
-   -   Is there a way to do global edits of the database? (http://www.photopost.com/forum/showthread.php?t=109421)

nbenton July 31st, 2004 08:03 AM

Is there a way to do global edits of the database?
 
Is there a way to do a global edit of the database? For example, can I select all of the pictures in a category, and have an additional keyword inserted, or change a particular keyword to a different keyword?

If there is not a direct PhotoPost approach, is there a desktop approach? I know that I can back up the database. Is there an application that converts the database to a desktop file format (like a spreadsheet) and then converts it back to the PhotoPost format?

Ned Benton

Chuck S July 31st, 2004 12:53 PM

The only way to mass edit the database is through the mysql replace command where you do a search on a field and replace all keywords with something else.

Now I would be very careful when doing this and backup your database before doing this

UPDATE pp_photos SET keywords = REPLACE(keywords, 'oldkeyword','newkeyword');

Note I used pp_ as the prefix you may need to change it.

nbenton August 1st, 2004 02:01 PM

Using the same strategy, could I insert a keyword in all of the photos in a category (but not all the the photos in the dataset?

Could I do this in a field that I defined myself?

donb August 1st, 2004 02:05 PM

Yes, you could. Just tag a WHERE cat=X to the end of the above.

Chuck S August 1st, 2004 02:17 PM

As Don said ;)

UPDATE pp_photos SET keywords = REPLACE(keywords, 'oldkeyword','newkeyword') WHERE cat = 'X';

nbenton August 2nd, 2004 06:00 AM

If there is no keyword (so I'm not replacing, I'm inserting a new one) do I leave the "oldkeyword" variable blank, or is there a different command?

Is there a basic summary of the mysql commands somewhere?

Can I copy the image filename into a field, so that when I change the title the filename is still in a field?

Thanks

Ned Benton

donb August 2nd, 2004 07:02 AM

UPDATE pp_photos SET keywords='blah' WHERE cat = 'X';

www.mysql.com


All times are GMT -5. The time now is 09:40 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.