From a47c4eecff79c1d57650b46c437b628d873705b2 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 12 Nov 2013 18:24:00 +0000 Subject: bisher uncommitete aenderungen am www.ffgraz.net (nicht von mir) --- db.class.php | 94 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'db.class.php') 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 @@ -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); - } -} - - -?> +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); + } +} + + +?> -- cgit v1.2.1