|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
upload an image file to a PostgreSQL table
can anybody tell me how to make a PHP script to upload an image file to a PostgreSQL table ? I'm a beginner so please make clear with some sample code if possible. Thanks!
|
|
#2
|
|||
|
|||
|
Hi Trinh,
I've just had a good search around for an answer to your question, and came up with http://www.j-elite.com/pgprimer/blobs.jsp. Give this a shot and see how you go. There seems to be very little documentation og PGSQL and BLOBS unfortunately. |
|
#3
|
|||
|
|||
|
Thank you, mytch. I'll check your link.
|
|
#4
|
|||
|
|||
|
Upload an image file to a table?
Not 'familiar' with such doing but I thought you can only upload pure text stuffs in database. What you actually should be doing is uploading an image using the enctype="multipart/form-data" in your form tag and have the receiving e.g. action.php, for instance, to intercept this request, extract the name from the file....like this $sFileName = trim($FileName); $sOrgFileName = trim($FileName_name); and store the $sFileName into the database. This then should be the value to be stored in the database (of course, you need to format it first)........Then when you want to load it out, just get the name from the database and pump it into a <img> tag
__________________
Beginner |
|
#5
|
|||
|
|||
|
Thank anyway. But Ive found myself the way to do that at the site: http://www.newbienetwork.net/content.php?id=35.
|
|
#6
|
|||
|
|||
|
tim try reading our blobing article on the php section of the site
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > upload an image file to a PostgreSQL table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|