LOAD_FILE(filename)

Description: Opens a file on the server whose full path and name are given by filename and returns the contents as a string. The MySQL user must have File_priv privilege; the file must be globally readable and must be no larger than the max_allowed_packet MySQL system variable.

Returns NULL if any of the preceding requirements are not met.

For versions of MySQL prior to 3.23, see the MySQL Technical Reference for details of how this function works in older versions.

Example:

INSERT INTO mytable
SET mydata=LOAD_FILE('/home/tonyb/mystuff.txt')

opens the file mystuff.txt and inserts its contents into the column mydata in table mytable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.106.9