diff --git a/www/mysql.class.php b/www/mysql.class.php
new file mode 100644
index 0000000..9343fdd
--- /dev/null
+++ b/www/mysql.class.php
@@ -0,0 +1,134 @@
+show_error = $show_error;
+ @$this->conn = mysql_connect($host, $user, $password);
+ if ($this->conn == false)
+ {
+ $this->error("Keine Verbindung zum Datenbank Server!", mysql_error());
+ return false;
+ }
+
+ if (!@mysql_select_db($database, $this->conn))
+ {
+ $this->error("Datenbank nicht gefunden!", mysql_error());
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Database::query()
+ *
+ * Führt einen MySQL Query aus
+ *
+ * @param mixed $query Auszuführender Query
+ * @return Result-Handler/FALSE
+ */
+ function query($query)
+ {
+ $this->result = @mysql_query($query, $this->conn);
+ if ($this->result == false)
+ {
+ $this->error("Fehlerhafte Datenbank Anfrage!", mysql_error());
+ return false;
+ }
+ return $this->result;
+ }
+
+ /**
+ * Database::fetchAssoc()
+ *
+ * Liefert alle gefundnen Datensätze als Assoc
+ *
+ * @param mixed $result Externer Result-Handler
+ * @return gefundene Datensätze als Assoc
+ */
+ function fetchAssoc($result = null)
+ {
+ if ($result != null)
+ {
+ return @mysql_fetch_assoc($result);
+ } else
+ {
+ return @mysql_fetch_assoc($this->result);
+ }
+ }
+
+ /**
+ * Database::count()
+ *
+ * Zählt alle gefundenen Datensätze
+ *
+ * @param mixed $result Externer Result-Handler
+ * @return Anzahl gefundener Datensätze
+ */
+ function count($result = null)
+ {
+ if ($result != null)
+ {
+ return @mysql_num_rows($result);
+ } else
+ {
+ return @mysql_num_rows($this->result);
+ }
+ }
+
+ /**
+ * Database::closeConnection()
+ *
+ * Schließt die bestehende MySQL Verbindung
+ *
+ * @return TRUE/FALSE
+ */
+ function closeConnection()
+ {
+ if (!@mysql_close($this->conn))
+ {
+ $this->error("Verbindung zur Datenbank konnte nicht getrennt werden!", mysql_error());
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Database::error()
+ *
+ * Gibt eine Interne Fehlermeldung aus
+ *
+ * @param mixed $error_msg Text der Fehlermeldung
+ * @param mixed $sql_err MySQL Fehlermeldung per mysql_error()
+ * @return NULL
+ */
+ private function error($error_msg, $sql_err)
+ {
+ if ($this->show_error)
+ {
+ echo "
MySQL Error: $error_msg
$sql_err";
+ return true;
+ //exit();
+ }
+ }
+
+} ?>
\ No newline at end of file