Restore the connection check

This commit is contained in:
Michael 2020-11-07 11:44:39 +00:00
parent 1e52c430e6
commit eb8caaa5e7
2 changed files with 8 additions and 9 deletions

View file

@ -385,12 +385,11 @@ class Database
switch ($this->driver) {
case self::PDO:
$connected = true;
// $r = $this->p("SELECT 1");
// if ($this->isResult($r)) {
// $row = $this->toArray($r);
// $connected = ($row[0]['1'] == '1');
// }
$r = $this->p("SELECT 1");
if ($this->isResult($r)) {
$row = $this->toArray($r);
$connected = ($row[0]['1'] == '1');
}
break;
case self::MYSQLI:
$connected = $this->connection->ping();