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
<html> <head> <meta http-equiv=&quo...
Tables once played a very important role in web p...
Table of contents 1. How to view the binary data ...
Without relying on JavaScript, pure CSS is used t...
1. Tomcat service is not open Enter localhost:808...
The container has already been created, how to kn...
Here 123WORDPRESS.COM presents the first part of ...
Table of contents 1. Retrieve the image 2. Create...
Description Solution VMware 15 virtual machine br...
Table of contents Introduction to Samba Server Sa...
1. Javascript returns to the previous page history...
1. Install the database 1) yum -y install mysql-s...
The Docker images we usually build are usually la...
<br />A contradiction arises. In small works...
No way, no way, it turns out that there are peopl...