Update database.mysql.cmd.php
This commit is contained in:
parent
2ebf144992
commit
feb2a7d594
|
@ -6,7 +6,7 @@
|
|||
* @brief MySQL(MariaDB) command line driver
|
||||
*/
|
||||
|
||||
if(function_exists("exec_db_mysql_cmd_query")) {
|
||||
if(check_function_exists("exec_db_mysql_cmd_query")) {
|
||||
function exec_db_mysql_cmd_query($sql, $bind) {
|
||||
$result = false;
|
||||
$config = get_config();
|
||||
|
@ -18,7 +18,7 @@ if(function_exists("exec_db_mysql_cmd_query")) {
|
|||
$args[] = sprintf("-u%s", $config['db_username']);
|
||||
$args[] = sprintf("-p%s", $config['db_password']);
|
||||
$args[] = sprintf("-h%s", $config['db_host']);
|
||||
$args[] = sprintf("-D %s", $config['db_name']);
|
||||
$args[] = sprintf("-D '%s'", $config['db_name']);
|
||||
$args[] = sprintf("-e '%s'", make_safe_argument($sql));
|
||||
|
||||
$cmd = trim(implode(" ", $args));
|
||||
|
@ -28,3 +28,10 @@ if(function_exists("exec_db_mysql_cmd_query")) {
|
|||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if(check_function_exists("exec_db_mysql_cmd_fetch_all")) {
|
||||
function exec_db_mysql_cmd_fetch_all() {
|
||||
// todo
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user