|
-
Aug 23rd, 2006, 04:49 AM
#1
Thread Starter
Hyperactive Member
PHP Picture + MySQL Database
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.
-
Aug 23rd, 2006, 04:59 AM
#2
New Member
Re: PHP Picture + MySQL Database
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
-
Aug 26th, 2006, 11:09 AM
#3
Member
Re: PHP Picture + MySQL Database
-
Sep 1st, 2006, 10:06 AM
#4
Junior Member
Re: PHP Picture + MySQL Database
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.
-
Sep 2nd, 2006, 12:06 AM
#5
Re: PHP Picture + MySQL Database
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|