Image link broken
I have been looking for years after a good data system for my 20,000+ pictures and have now found it.
Anders Nilsson - Toftendata - Denmark
Thu, 05/19/2011 - 15:05
kcoquia
Offline
Joined: 05/19/2011
I store all of my images on a share on a server, and my admin recently changed the name of the share, breaking the link to every image in my database. Does anyone know how to fix this in MySQL or DBGallery?
Navigation
Recent blog posts
- Photos: Memory Triggers
- Surprisingly Useful Search Options in DBGallery
- Ten Realities of Photo Organization
- A Photo Collection's True Value
- I Love GPS Data
- Photo Organization Fundamentals: Four Intermediate Tips (Video 2)
- Photo Organization Fundamentals: Four Most Important (Video 1)
- New DBGallery web site
- Photo Organization Fundamentals: Chronological Folder Names
Recent comments
- The use of web application
20 hours 47 min ago - I decided to give DBGallery
1 week 3 days ago - Excellent search options!
1 week 4 days ago - Video Remarks
9 weeks 14 hours ago - Landscape Wins
9 weeks 2 days ago
Poll
Random FAQ
Yes. The RegNow purchase option on the order page facilitates this. Let RegNow know you are wish to place a tax free order and they will create one for you. Your company's tax-free organization papers will be required at time of purchase. Contact GRR Systems via it's

The cleanest way to do this is via a MySql query.
First:
Quit DBGallery
Backup the database as per normal procedures. Please do not ignore this step! Unless using your companies particular backup mean, backup is described in DBGallery's User Guide.
Then execute the following Sql:
use dbgallery;
update images set img_loc = replace(img_loc, '\\<old share name>\\', '\\<new share name>\\');
update folders set folder_fullpath = replace(folder_fullpath, '\\<old share name>\\', '\\<new share name>\\');
Replace <old share name> and <new share name> with what is in your environment. Note the single quotes and \\ are required.
Example:
----------------
I had a photo server named QAServer with a shared drive named SharedPhotos. Hence a path to a photo was
'\\QAServer\SharedPhotos\2011-01 - Snowy Mountains\IMG_00234.jpg'.
The share was renamed to ImageShare. The full path then became
'\\QAServer\ImageShare\2011-01 - Snowy Mountains\IMG_00234.jpg'
Hence the following Sql was needed:
update images set img_loc = replace(img_loc, '\\SharedPhotos\\', '\\ImageShare\\');
update folders set folder_fullpath = replace(folder_fullpath, '\\SharedPhotos\\', '\\ImageShare\\');
I hope you agree it's nice and simple.
Executing the Sql
-----------------------------
Regarding how to execute the Sql, you'll need a software tool which allows you to execute Sql statements against a MySql database. If using DBGallery regularly you likely already have MySql Administrator and Query Browser, especially if following the User Guide's database backup instructions. Use the Query Browser, or other similar software such as the awesome MySql Workbench, to execute the Sql above.
Best Regards,
Glenn
Developer of DBGallery: The Photo Database System