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
First download the dependencies: cnpm i -S vue-uu...
1. Download the axios plugin cnpm install axios -...
This article shares with you how to install the M...
Today we are going to create a simple heartbeat e...
1. Docker installation and startup yum install ep...
1. Spread Operator The spread operator is three d...
<br />The following are the problems I encou...
Firefox, Opera and other browsers do not support W...
1. Unzip nginx-1.8.1.tar.gz 2. Unzip fastdfs-ngin...
When the front-end requests the interface, it is ...
The browser displays TIF format images Copy code T...
This article example shares the specific code of ...
In many cases, large and medium-sized websites wi...
Table of contents 1. Current situation 2. Communi...
mysql query control statements Field deduplicatio...