By phpfresher
via phpfresher.com
Published: Jan 12 2013 / 09:02
This is the article about the way of storing images in mysql database using the blob column type in mysql. When dealing with a large amount of images, it is often useful to store them in a database. This makes accessing and changing the pictures easy and streamlined, even when you need to change more than one at once. One common task performed on stored images is to resize the image. Uploading and resizing an image using PHP and MySQL can be very simple, and it allows you to do many things, like create a batch of thumbnails for your image gallery, or just display a given image in a size other than the original. To begin, let us discuss about blob data type. It is a Binary Large Object. In short, a blob is a field type for storing Binary Data. Images are made up of binary data. This data cannot be stored in normal text fields in MySQL (such as text or varchar). Instead, we must use the blob type. MYSQL has four types of blobs:
Add your comment