PDA

View Full Version : Displaying Images from a MySQL database in DW8


nogger
05-25-2015, 09:10 AM
Hi all, looking for some help displaying images from a database in DW8. I have used DW for basic stuff in the past but now i am trying to use it to build a more dynamic site.

The site will be an affiliate site & i have downloaded & imported a datafeed into a MySQL database on the remote server. I can access the database ok & see all my records but the problem is that the feed contains the URL's to product images & not the images themselves. Obviously when i try to display the images all i see is the URL listed on the screen & not the image itself. There are links to 5 different size images in the datafeed.

How can i get the actual product images to display instead of the URL link to them, is there a command or something i can do from within Dreamweaver or PHP or do i need to modify the datafeed first ?

Any help much appreciated.

Graham

edbr
05-25-2015, 09:48 AM
There are links to 5 different size images in the datafeed.
so you would use them. show an example of your data and
how you have tries to cde ( url)

nogger
05-25-2015, 11:14 AM
HI edbr, thank's for the quick response. I have attached some images of the problem i have & will try to be as clear as possible.

The website will be a site selling ladies lingerie & i have a datafeed (.CSV) from the supplier (image1 - Datafeed). As you can see the first line contains the headers for the columns G & H you can see the links to where the images are stored. Image 2 (Recordset) shows that DW conected to the server & pulled down the recordset from the MySQL database.

Image 3 (TableData) shows a simple table on my website & i have pulled into the table 4 fields including {Recordset1.ImageURL200by200}.

Now,when i go to Live Data all i see of course is the URL to the image, not the image itself (Image 4-Live Data View). Everything else is fine but i don't know how to have the image displayed instead of the URL to the image.

Image 5 (Table Echo) shows the code for the table in question. As you see it simply echo's what it finds in lines 47-50 of this example. I need to be able to change from an echo to something like a GET type of command so instead of echoing the URL it gets the image at that URL.

This is just a test example but i will probably be using Horizontal Looper Repeat Region: from Tom Muck in the actual website

Thanks
Graham

edbr
05-25-2015, 11:32 AM
<img src="<?php echo recordset1[' url field'] ; ?>" >
Im on my phone so not easy to code but you hopefully can edit from thay correct db field etc

nogger
05-25-2015, 02:15 PM
Thanks edbr, i will play around with that & see what i can do with it.

Graham