i am new in myqsl. i need help, who one like to help me, i want to store image in mysql tale, how can i do it, what kind of data type , i have to declare when creating the tale. thank in advance
If you are writing a web application, I strongly recommend that instead of storing the image data in the database, you store the image on your server's filesystem and store the filename in your database.
If you store the data in the database, you will have to replicated in your code many of the functions of the web server -- and there's no point reinventing the wheel.
I agree that blob type is needed. But I believe that each time your web visitor views the image, it will be read and downloaded from the db. I have IE6.0 and it doesn't seem to cache the image(s), making for a page re-load that is slower than if the images were stored in files on the server. Depending on the size and number of images on a page, that may or may not be an issue.
Please correct me if I'm wrong, but that's what I've noticed.
Of cource IE can't cache the graphics. The graphics are begin produced on-the-fly by a script.
If the graphics reside on the filesystem, then IE's caching mechanism can query the web server and find out the creation date of the file. Since fetching the graphic from a database means that the image is being produced on-the-fly, the cache thinks there is a new graphic every time.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.