Problem calling image from Db


#1

I am having problems calling image from the Database, with DW recordset. all i could see is just the image path. Anyone with idea please help


#2

No na… Is ur db format in blob form, if not u can’t save it in the database… Well most time, its the link yu keep in the dababase that u call… That’s dw’s default format


#3

No na… Is ur db format in blob form, if not u can’t save it in the database… Well most time, its the link yu keep in the dababase that u call… That’s dw’s default format


#4

from wat u are saying I am guessing the image wasn’t stored in the db but in a file location and the image path was stored in the db rigth? If so by simply putting the path in a image path you should get ur image displayed eg (I am assuming u are using php)


#5

How could i do that with DW’s Recordset


#6

well with a recordset u the path of the image would be some thing like this $ _ row [ ‘the_path’ ] all u have to do is put this in a image tag like this < i m g src=’ <?= $ _ row [ 'the_path' ] ?> ’


#7

thanks Codegidi, it really works


#8

U welcome


#9

I would nto store actual images in a DB, because binary files will eventually fill up your db. It’s better and faster for your code to store the reference to your image and then the file somewhere.


#10

I concur on @tallgal 's advice. Storing image binary code in DB is not a good idea.


#11

thanks guy i got the job done by storing the image in filesystem and the path in DB