| ★ wanayoo — archive 1999 http://www.phpbuilder.com/columns/florian19991014.php3 | Nouvelle recherche | Portail wanayoo |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Binary Data + MySQL + PHPOr: How to store images directly in the sql database
If you want to store binary data like images and html files directly in your MySQL database, this column is for you! I will show how you can store the data via the HTML forms "File" feature in your database and how you can access and use this data in your webproject. If you have read the article "PHP, MySQL and images" by William Samplonius here on phpbuilder.com, this might be interesting for you as William stores the binary data somewhere on your harddisk (using a shell command), instead of storing the image directly in the Sql-Database. Overview:
Create a new database on your SQL Server First of all, you have to create a new database on your SQL server in which your script will store the binary data. For my example I use the following structure. To create this database, you have to do the following steps:
CREATE TABLE binary_data (
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sample Code Library | Columns | Mail Archive | Support Forums | Get Started! | Links | Contribute!
Contact (non support questions)
Copyright 2000 internet.com Corp.
All Rights Reserved. Legal Notices,
Reprints.
Privacy Policy
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||