In MySQL, the LOAD_FILE() function reads a file and returns its contents as a string. grammar
Where file_name is the full path to the file. Here is an example of me selecting content from a file:
result:
An example of a database Here is an example of a query that inserts the contents of a file into a database:
In this example, the column MyBlobColumn has a BLOB data type (allowing it to store binary data). Now that it is in the database, we can select it:
result:
If the file does not exist, returns NULL:
result:
You may also be interested in:
|
<<: JD Vue3 component library supports the detailed process of mini program development
>>: Linux uses iftop to monitor network card traffic in real time
Preface Because computer numbers are floating poi...
Preface In JavaScript, you need to use document.q...
Before the arrow was shot, the bow whispered to t...
Table of contents Preface: 1. Default value relat...
To search for RocketMQ images, you can search on ...
Table of contents 1. Function Binding 2. With par...
View the dependent libraries of so or executable ...
After installing Docker on the Linux server, Pull...
Preface Those who have played with MySQL must be ...
Static files Nginx is known for its high performa...
The first step is to add the corresponding databa...
I won’t waste any more time talking nonsense, let...
Floating elements cause their parent elements to ...
Table of contents Overview Problem Description Ci...
Table of contents vue2.x vue3.x tiny-emitter plug...