Advertisement
C_Volume2 String Manipulation #84230

Storing / Retrieving pictures from database

Hi folks I have searched many sites for storing a picture into a database and retrieve the same. But I got some tutorials when I searched the web. Using the tutorials I have a made one for me. It was implemented using Php and Mysql. I will tell you want is the job of each files. 1). index.php This files links all the files in the project. 2). store.php This does the job of storing the picture into the database. 3). viewadd.php This file shows the entire picture stored in the database. 4). getpicture.php This file actually gets the file from file in the form of picture 5). mdbc.inc.php This is a class file for Mysql feel free to use. I got this over net. Here is the table description Id - > has the picture id Description -> has the picture description bin_data -> picture data filename -> picture file name filetype -> picture file type. Like gif or jpeg etc link -> you can store the link incase if you want to use this for ad exchange showno - > no of time ad show etc clickcount -> no of time the ad being clicked etc Query for the table. CREATE TABLE ads ( id varchar(15), description varchar(255), bin_data LONGBLOB, filename varchar(50), filesize varchar(50), filetype varchar(50), link varchar(255), shownno integer(5), clickcount integer(5), unique(id) ); If you want to see a site where I have implemented please have a look at the site http://www.asksathia.com/ Feel free to change anything in the code. If you developed a better version than this please send me the source code so that I may update myself. It took me much time when commenting the code of ease of understanding. Please vote for me. Regards Imthiaz Rafiq imthiazrafiq@gmx.net Msn id: imthiazrafiq@gmx.net Yahoo id: imthiazrafiq ICQ: 24294947 URL: http://high-flyer.da.ru/

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine