Simplified connection test
This commit is contained in:
parent
8baac61212
commit
d6a1a836f1
1 changed files with 5 additions and 4 deletions
|
@ -386,10 +386,11 @@ class Database
|
||||||
switch ($this->driver) {
|
switch ($this->driver) {
|
||||||
case self::PDO:
|
case self::PDO:
|
||||||
$r = $this->p("SELECT 1");
|
$r = $this->p("SELECT 1");
|
||||||
if ($this->isResult($r)) {
|
$connected = $this->isResult($r);
|
||||||
$row = $this->toArray($r);
|
// if ($this->isResult($r)) {
|
||||||
$connected = ($row[0]['1'] == '1');
|
// $row = $this->toArray($r);
|
||||||
}
|
// $connected = ($row[0]['1'] == '1');
|
||||||
|
// }
|
||||||
break;
|
break;
|
||||||
case self::MYSQLI:
|
case self::MYSQLI:
|
||||||
$connected = $this->connection->ping();
|
$connected = $this->connection->ping();
|
||||||
|
|
Loading…
Reference in a new issue