Update database.mysql.cmd.php
This commit is contained in:
parent
1bfedfb09b
commit
4512a7fdfc
|
@ -15,12 +15,12 @@ if(check_function_exists("exec_db_mysql_cmd_query")) {
|
|||
$sql = get_db_binded_sql($sql, $bind);
|
||||
|
||||
if(loadHelper("exectool")) {
|
||||
$args[] = sprintf("-u%s", $config['db_username']);
|
||||
$args[] = sprintf("-p%s", $config['db_password']);
|
||||
$args[] = sprintf("-h%s", $config['db_host']);
|
||||
$args[] = sprintf("-u'%s'", $config['db_username']);
|
||||
$args[] = sprintf("-p'%s'", $config['db_password']);
|
||||
$args[] = sprintf("-h'%s'", $config['db_host']);
|
||||
$args[] = "-s"; // --slient
|
||||
$args[] = sprintf("-D '%s'", $config['db_name']);
|
||||
$args[] = sprintf("-e '%s'", make_safe_argument($sql));
|
||||
$args[] = sprintf("-D'%s'", $config['db_name']);
|
||||
$args[] = sprintf("-e'%s'", make_safe_argument($sql));
|
||||
|
||||
$cmd = implode(" ", $args);
|
||||
$result = exec_command($cmd);
|
||||
|
@ -40,7 +40,7 @@ if(check_function_exists("exec_db_mysql_cmd_fetch_all")) {
|
|||
foreach ($lines as $line) {
|
||||
$rows[] = str_getcsv($line, "\t");
|
||||
}
|
||||
|
||||
|
||||
if(count($rows) > 0) {
|
||||
$result = $rows;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user