minusten — 2011-09-11T17:41:41-04:00 — #1
I am currently undertaking a training exercise which requires that
an image be inserted, stored and retrieved from a mysql database via php.
Ive read on various other online sources that this isnt a good way to go because
of the amount of resources it uses.
Is this the case,
what is the industry standard?
what is an alternative option?
Im quite new to database intergration and would appreciatte all insights into this area , to help me get an idea of the big picture.:D
scallioxtx — 2011-09-11T18:03:12-04:00 — #2
The most commonly accepted way is to store the actual image on the disk and then store the path to the image in the database.
Simply because that way the web server (apache, lighttpd, etc) can serve the image as a static file, instead of php having to pipe through a blob from a database, which is much more expensive in terms of resources (which is what you'd have to do if you stored the image in a database).
minusten — 2011-09-12T05:08:44-04:00 — #3
thanks heaps thats really helped me out