Performs a batch insert into a specific table using either LOAD DATA INFILE or plain INSERTs,
as a fallback. On MySQL, LOAD DATA INFILE is 20x faster than a series of plain INSERTs.
public static tableInsertBatch ( string $tableName, array $fields, array $values, boolean $throwException = false, string $charset = 'utf8' ) : boolean | ||
$tableName | string | PREFIXED table name! you must call Common::prefixTable() before passing the table name |
$fields | array | array of unquoted field names |
$values | array | array of data to be inserted |
$throwException | boolean | Whether to throw an exception that was caught while trying LOAD DATA INFILE, or not. |
$charset | string | The charset to use, defaults to utf8 |
return | boolean | True if the bulk LOAD was used, false if we fallback to plain INSERTs |