Fix: escape for create command
This commit is contained in:
parent
dc532cc2d4
commit
b4aa076a82
@ -808,7 +808,7 @@ class DoliDBMysql
|
|||||||
if (! $ret)
|
if (! $ret)
|
||||||
{
|
{
|
||||||
// We try again for compatibility with Mysql < 4.1.1
|
// We try again for compatibility with Mysql < 4.1.1
|
||||||
$sql = 'CREATE DATABASE '.$database;
|
$sql = "CREATE DATABASE `".$this->escape($database)."`";
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
$ret=$this->query($sql);
|
$ret=$this->query($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -802,7 +802,7 @@ class DoliDBMysqli
|
|||||||
if (! $ret)
|
if (! $ret)
|
||||||
{
|
{
|
||||||
// We try again for compatibility with Mysql < 4.1.1
|
// We try again for compatibility with Mysql < 4.1.1
|
||||||
$sql = 'CREATE DATABASE '.$database;
|
$sql = "CREATE DATABASE `".$this->escape($database)."`";
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
$ret=$this->query($sql);
|
$ret=$this->query($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user