Web server type - Chapter 4: Architecture of an Intranet Application {
Chapter 4: Architecture of an Intranet Application { return $this->connected; } function disconnect() { if (isset($this->dbh)) { $this->dbh->disconnect(); return 1; } else { return 0; } } function query($statement) { $result = $this->dbh->query($statement); if (DB::isError($result)) { $this->setError($result->getMessage()); return null; } else { return $result; } } function setError($msg = null) { global $TABLE_DOES_NOT_EXIST, $TABLE_UNKNOWN_ERROR; $this->error = $msg; if (strpos($msg, no such table )) { $this->error_type = $TABLE_DOES_NOT_EXIST; } else { Continued