Parameterizing file name in MYSQL LOAD DATA INFILE
问题 Is there a way to dynamically specify a file name in the LOAD DATA INFILE? Can it be parameterized like for instance (syntax may be incorrect) LOAD DATA INFILE '$filename'? 回答1: A citation from MySQL documentation: The LOAD DATA INFILE statement reads rows from a text file into a table at a very high speed. The file name must be given as a literal string. That means that it can not be a parameter of a prepared statement. But no one forbids to make the string interpolation while the statement