PHP Classes

PHP Image MySQL PDO: Save and show image from MySQL blob using PDO

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 789 All time: 4,322 This week: 73Up
Version License PHP version Categories
image-db-pdo 0.2GNU General Publi...5PHP 5, Databases, Files and Folders
Description 

Author

This class can save and show image from MySQL blob using PDO.

It can take an image from a file or uploaded via a form and inserts a record in a given MySQL table using PDO prepared query pulling the file data into a BLOB field.

The class can execute a SELECT query to read a previously stored image file from the same database table and serves it as the current script output with a content type also stored in the same MySQL database table record.

Picture of mehrdad seifzadeh
  Performance   Level  
Name: mehrdad seifzadeh <contact>
Classes: 1 package by
Country: United States United States
Age: 36
All time rank: 2675368 in United States United States
Week rank: 195 Up20 in United States United States Up

  Files folder image Files (5)  
File Role Description
Plain text file db_schema.sql Example sample table structure
Plain text file example.php Data main of example run to save(sample save form)
Plain text file example_save_image.php Example example of save image to database
Plain text file example_show_image.php Example example of show image
Plain text file img2db_pdo.class.php Class the main class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:789
This week:0
All time:4,322
This week:73Up