PHPBear Posted March 4, 2015 Share Posted March 4, 2015 I don't know if this is the right forum for this question, but here goes... I have a lot of articles with images stored in a number of database tables. I'd love to have some way of keeping track of all my images, but it's hard to keep up with all the updates. If I list all my images in a spreadsheet, for example, then I'd have to change the path to 100 images if those images get moved into a new folder. But I wondered if there might be some way to display a list of all the images in a database table using regex or something similar. Image a table named geozoo_articles, for example, with articles stored in a field named 'Article'. Is there some way I could display every article, but with everything deleted except images? Many of my images are displayed in floated or centered divs, like this: <div class="Img pull-right Wx400"> <img src="map.jpg" alt="A map"> <div class="Caption">This is a map</div> </div> So I actually have two goals. The first is to simply create a list of images (with matching pages or URL's): map.jpg The other goal is to create a list of all divs that contain images, with all the related information. In other words, an article that features ten paragraphs plus the image cited above would display this: <div class="Img pull-right Wx400"> <img src="map.jpg" alt="A map"> <div class="Caption">This is a map</div> </div> I imagine that would be pretty tricky, but would it be doable if I gave every div that includes an image the tag Img? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/295062-indexing-images-in-database-table/ Share on other sites More sharing options...
Anand_Agrawal Posted July 30, 2015 Share Posted July 30, 2015 I think the best way to manage all images, you can create a php script that will fetch all images detail from all tables and insert in any single table, and you can change or update the records according to your requirement. Quote Link to comment https://forums.phpfreaks.com/topic/295062-indexing-images-in-database-table/#findComment-1517744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.