|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
hi
i created a table and a field with blob datatype. now i want to insert an image into the mysql database. i tried through the insert command but i assume that is not the right way. I gave the path where the picture is stored. but it stores it on the database as a string... please help me with a procedure so that i can follow easily. I am simply stuck up and cannot resolve this? thanks tremendously! |
|
#2
|
|||
|
|||
|
I personally **NEVER** insert the image(s) inside my database.
Why? Because It can/will increase the size of my/the database dramatically. I'm NOT saying its a BAD thing, in fact, its there for a reason(the blob datatype) My suggestion to you is : Instead of INSERTing the image INSIDE the database, simply INSERT the file's PATH("C:\whatever\image1.gif") Then physically store the image on the hard drive inside a folder. Hope this helps! Sincerely Vlince |
|
#3
|
|||
|
|||
|
Images cannot be inserted using an SQL insert statement.
You have to upload them as binary objects. there are lot of scripts out on the internet that help u upload images. I remember doing it long back in ASP. But not the details of it very clearly, Sorry! |
|
#4
|
|||
|
|||
|
good job, you still shouldn't do it, DB overhead on pictures is enourmous, and retardedly unneccesary, store the path, or a link in the DB.
|
|
#5
|
|||
|
|||
|
hey thanks all for ur valuable suggestions. But my purpose is on selecting a particular topic from a drop down menu ... a person should be able to see some 3-4 pictures related to it from teh database.
how can i achieve this ? thanks anyways |
|
#6
|
|||
|
|||
|
if you do vlince's method with the path you'd just say
img scr="<%=RS("link")%>" i'm not sure how you have it set up but wherever you'd declare the image source or picture, you'd just past the link from the db. so when you select a option, you query the db, and the links are identified with another column, so your db would be like ID topic link 1 FSD D:/.......... 2 FSD D:/......... 3 ITS D:/......... etc, and in the query you'd Code:
select link from table where topic = 'blah' then Code:
while not RS.eof
img scr="<%=RS("link")%>
RS.MoveNext
loop
Last edited by unatratnag : August 18th, 2003 at 08:53 PM. |
|
#7
|
|||
|
|||
|
Here is a good tutorial on storing images in a database via asp
http://www.stardeveloper.com/articl...01033101&page=1 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > insert image |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|