Ok a new question... displaying BLOB photos!

Now I got a table with mediumblob and photos are now in it.

But how do I show them on a screen?

I’ve tried to mimic using a select * from the_table

and then a echo of the rows but there is no echo!

Do you have to display it in some certain format or form?

Thanks,

Deaf

Usually you store file path/name in the database, not the file itself. Some argue that they want it stored in the db and not the file system, but since your database is stored in a file you are either way storing the images in the file system :stuck_out_tongue:

I’d suggest moving them, it’s much easier to let the db and the file system do what they were made for.

if you can’t then you must create a php script that displays an image like getimage.php?id=23897, then fetch the id from the database, set header type to image, and output the image.

you can then use this on your site like
[php][/php]

Ok, I have the image in a table (actually for each physician there is a photo in the file for them.)

The idea is to use the physician number to retrieve their demographics and the photo ID.

I use a INSERT command to put the data in the file, including the image.

Can one directly read the file (SELECT) and display the image?

Thanks,

Deaf

Sponsor our Newsletter | Privacy Policy | Terms of Service