I would like to know how to store a picture, say 1.jpg in MySQL. Is there any inbuild function to do this ? Please suggest me.
Printable View
I would like to know how to store a picture, say 1.jpg in MySQL. Is there any inbuild function to do this ? Please suggest me.
i use php5 pdo functions to do this
see pdo
i reccomend mysql5 tho for this, and u have to realise you are adding quite an overhead by storing images in DB
heres a link as well http://codewalkers.com/tutorials/35/1.html
hi
http://www.wellho.net/solutions/php-...-retreive.html this could help u
Have you considered doing it the simpler way...you can put your images in a folder and simply put the path to the image in the database...also keeps the size of your db more reasonable. then just add..... <? ...<img src="<? $imagepath ?>"> ..?> ...html code to display.
Please speak in English. "u" is, contrary to what appears to be popular belief, not an acceptable form of the word "you".
You can store images in a database in BLOB format. However, it's a fairly pointless task, since you then need to output it in a form a user agent can display, which usually means writing to a temporary file. Stephan's suggestion is more reasonable, store the path to the image instead, then you avoid all this nonsense.