/** * check_database * * Make sure that we can connect to the database */ public static function check_database() { $dbh = self::_connect(); if (!$dbh || $dbh->errorCode()) { if ($dbh) { self::$_error = json_encode($dbh->errorInfo()); } return false; } return true; }