Update database.mysql.cmd.php

This commit is contained in:
Namhyeon Go 2019-09-16 13:31:44 +09:00 committed by GitHub
parent 09da36cf36
commit dc9673c6b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,15 @@ if(!check_function_exists("exec_db_mysql_cmd_fetch_all")) {
$tsvData = exec_db_mysql_cmd_query($sql, $bind);
$lines = explode(DOC_EOL, $tsvData);
$rows = array();
foreach ($lines as $line) {
$rows[] = str_getcsv($line, "\t");
if(check_function_exists("str_getcsv")) {
foreach($lines as $line) {
$rows[] = str_getcsv($line, "\t");
}
} else {
foreach($lines as $line) {
$rows[] = explode("\t", $line);
}
}
if(count($rows) > 0) {