Двоичные данные в MySQL

Для такой таблицы:

CREATE TABLE binary_data (
    id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    description CHAR(50),
    bin_data LONGBLOB,
    filename CHAR(50),
    filesize CHAR(50),
    filetype CHAR(50)
);

Вот пример mysqlclient PHP:


    // Example php script to demonstrate the storing of binary files into
    // an sql database. More information can be found at http://www.phpbuilder.com/
?>


    Store binary data into SQL Database

    
        This file has the following Database ID: $id";

                mysql_close();
            } else {

                // else show the form to submit new data:
        ?>
        
File Description:

File to upload/store in database:

mysql

database

binary-data

data-storage

2022-10-11T17:45:03+00:00