summaryrefslogtreecommitdiff
path: root/db.class.php
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@ffgraz.net>2013-11-12 18:24:00 +0000
committerOthmar Gsenger <otti@ffgraz.net>2013-11-12 18:24:00 +0000
commita47c4eecff79c1d57650b46c437b628d873705b2 (patch)
tree9d53fe963419ce8965fe237be47784c1afd84510 /db.class.php
parentf6be9edd401664d95e60ae3c81aeaf36723ba891 (diff)
bisher uncommitete aenderungen am www.ffgraz.net (nicht von mir)
Diffstat (limited to 'db.class.php')
-rw-r--r--db.class.php94
1 files changed, 47 insertions, 47 deletions
diff --git a/db.class.php b/db.class.php
index 28dba49..0921bc8 100644
--- a/db.class.php
+++ b/db.class.php
@@ -1,47 +1,47 @@
-<?php
-class DB {
-var $user, $pass, $host, $dbname;
-var $db;
-var $res;
-
-function DB($user, $pass, $host, $dbname) {
- $this->user = $user;
- $this->pass = $pass;
- $this->host = $host;
- $this->dbname = $dbname;
- $this->connect();
-}
-
-function connect() {
- $this->db = mysql_connect($this->host, $this->user, $this->pass)
- or $this->error("Verbindungsaufbau fehlgeschlagen");
- mysql_select_db($this->dbname);
-}
-
-function error($msg) {
- die($msg . ": " . @mysql_error());
-}
-
-function query($query) {
- $this->res = mysql_query($query, $this->db)
- or $this->error("Fehler bei Datenbankanfrage");
-}
-
-function escape_string($string) {
- return mysql_real_escape_string($string, $this->db);
-}
-
-function numObjects() {
- return mysql_num_rows($this->res);
-}
-
-function getNextObject() {
- if (!$this->res) {
- return;
- }
- return mysql_fetch_object($this->res);
- }
-}
-
-
-?>
+<?php
+class DB {
+var $user, $pass, $host, $dbname;
+var $db;
+var $res;
+
+function DB($user, $pass, $host, $dbname) {
+ $this->user = $user;
+ $this->pass = $pass;
+ $this->host = $host;
+ $this->dbname = $dbname;
+ $this->connect();
+}
+
+function connect() {
+ $this->db = mysql_connect($this->host, $this->user, $this->pass)
+ or $this->error("Verbindungsaufbau fehlgeschlagen");
+ mysql_select_db($this->dbname);
+}
+
+function error($msg) {
+ die($msg . ": " . @mysql_error());
+}
+
+function query($query) {
+ $this->res = mysql_query($query, $this->db)
+ or $this->error("Fehler bei Datenbankanfrage");
+}
+
+function escape_string($string) {
+ return mysql_real_escape_string($string, $this->db);
+}
+
+function numObjects() {
+ return mysql_num_rows($this->res);
+}
+
+function getNextObject() {
+ if (!$this->res) {
+ return;
+ }
+ return mysql_fetch_object($this->res);
+ }
+}
+
+
+?>