- quietent a warning if the connecting database does not exist

- cant use mysqli_real_escape_string without DB-connection, falling back to default quoting
This commit is contained in:
Ralf Becker 2005-11-14 06:17:43 +00:00
parent c23bc572be
commit 35a77b3c36

View File

@ -86,7 +86,7 @@ class ADODB_mysqli extends ADOConnection {
}
if (strstr($argHostname,':')) list($argHostname,$this->port) = explode(':',$argHostname);
$ok = mysqli_real_connect($this->_connectionID,
$ok = @mysqli_real_connect($this->_connectionID,
$argHostname,
$argUsername,
$argPassword,
@ -176,7 +176,7 @@ class ADODB_mysqli extends ADOConnection {
function qstr($s, $magic_quotes = false)
{
if (!$magic_quotes) {
if (PHP_VERSION >= 5)
if (PHP_VERSION >= 5 && $this->_connectionID)
return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'";
if ($this->replaceQuote[0] == '\\')