Example #1
0
 /**
  * void connection(DbConnection $conn, bool $goOut = true)
  *
  * Displays the connection error page
  *
  * @param DbConnection $conn DbConnection object containing connection error parameters.
  * @param bool $goOut if true, execute an exit()
  * @return void
  * @access public
  */
 function connection($conn, $goOut = true)
 {
     self::message($conn->getError() . " " . $conn->getDbErrno() . " - " . $conn->getDbError() . "." . $conn->getSQL());
     if (defined("OPEN_DEBUG") && OPEN_DEBUG) {
         echo PHP_EOL . "<!-- _dbErrno = " . $conn->getDbErrno() . "-->" . PHP_EOL;
         echo "<!-- _dbError = " . $conn->getDbError() . "-->" . PHP_EOL;
         echo "<!-- _error = " . $conn->getError() . "-->" . PHP_EOL;
         if ($conn->getSQL() != "") {
             echo "<!-- _SQL = " . $conn->getSQL() . "-->" . PHP_EOL;
         }
     }
     if ($conn->getDbErrno() == 1049) {
         echo '<p><a href="../install.html">' . "Install instructions" . '</a></p>' . PHP_EOL;
     }
     if ($goOut) {
         exit($conn->getError());
     }
 }