This topic is locked

Displaying Photos - Anyone know how?

2/15/2006 1:29:06 PM
PHPRunner General questions
D
DouglasB author

I have a mySQL database. When I do a table view of this database I want to be able to show a picture that cooensponds to the record.
I have no idea how to go about doing this, so I think I need:
How to get the picture into the database or how to link a photo to a record.
Has anyone done something like this before?

Sergey Kornilov admin 2/16/2006

Douglas,
There are two ways to implement this.

  1. You can save your images directly in database. Add a new field of BLOB type to your table, select Database image in View as and Edit as dropdown boxes for this field on Formatting Tab.
  2. You can save your images in a directory on your server. Add a new field of Varchar type to your table, select File-based image in View as and Document upload in Edit as dropdown boxes for this field on the Formatting Tab.

D
DouglasB author 2/16/2006

Sergey,
As always I can't see the forest because all the trees are in the way!
I knew how to do this but I was loking in the wrong place!
Thanks a million

Douglas,

There are two ways to implement this.

  1. You can save your images directly in database. Add a new field of BLOB type to your table, select Database image in View as and Edit as dropdown boxes for this field on Formatting Tab.
  2. You can save your images in a directory on your server. Add a new field of Varchar type to your table, select File-based image in View as and Document upload in Edit as dropdown boxes for this field on the Formatting Tab.

A
asimha 3/14/2006

That's a nice explanation and it works just fine!
Now how would one add a link to the actual image rather than just the thumbnail ?
Thank you

Andre

B
bbanks 6/13/2006

I followed the directions 1 and 2 below and it just doesnt work for me. I can display images as long as I don't use Document upload or Database images. Using 3.0
can anyone help?

  1. You can save your images directly in database. Add a new field of BLOB type to your table, select Database image in View as and Edit as dropdown boxes for this field on Formatting Tab.
  2. You can save your images in a directory on your server. Add a new field of Varchar type to your table, select File-based image in View as and Document upload in Edit as dropdown boxes for this field on the Formatting Tab.

J
Jane 6/14/2006

Bart,
I'm really confused with your message.
Please give me a more detailed description of what you're doing.

B
bbanks 6/14/2006

Bart,

I'm really confused with your message.
Please give me a more detailed description of what you're doing.


I have a table in mysql database with 3 fields: ID - Int autoincrement, Image - Varchar(50), Description - Varchar(255).
When I set the Image field in PHPRunner to View as file-based image and the edit as document upload it appears to upload the image just fine, but when I view the image it does not show up. If I navigate to the upload folder on the website the image is there but when I try to open the image I get an error. If I copy and paste over the image with the original image and try to view again it works. Something is going wrong when the image is uploading.
The same thing happens if I set the image field in mysql to blob and change the image field in PHPRunner View as and Edit as to Database Image

Sergey Kornilov admin 6/14/2006

Bart,
send me your project, generated files and database. I'll find what's wrong and be back to you.

B
bbanks 6/14/2006

I have 2 versions of Mysql. Version 5.0 works just fine but Version 3.23.47 doesn't seem to work. Is there a problem with Version 3.23.47?

Bart,

send me your project, generated files and database. I'll find what's wrong and be back to you.

Sergey Kornilov admin 6/15/2006

Well, version 3.23 is kind of old. Most web hosting companies offer MySQL 4.x or 5.x.