dbType = CONF_DB_TYPE; $this->dbHost = CONF_DB_HOST; $this->dbDatabase = $strdatabase; $this->dbUser = CONF_DB_USER; $this->dbPassword = CONF_DB_PASSWORD; $this->dbPersistent = false; } function connect() { if ($this->dbType == "mysql") { if ($this->dbPersistent) { $this->dbLink = mysql_pconnect($this->dbHost, $this->dbUser, $this->dbPassword); } else { $this->dbLink = mysql_connect($this->dbHost, $this->dbUser, $this->dbPassword); } mysql_select_db($this->dbDatabase); } } function close() { if ($this->dbType == "mysql") { if (!$this->dbPersistent) { mysql_close($this->dbLink); } } } function execute($query) { $this->result = mysql_query($query); $line = mysql_insert_id($this->dbLink); } function fetchAll($query) { $this->result = mysql_query($query); $resultArray = array(); while ($line = mysql_fetch_array($this->result, MYSQL_ASSOC)) { $resultArray[] = $line; } return $resultArray; } function fetchOne($query) { $this->result = mysql_query($query); $line = mysql_fetch_array($this->result, MYSQL_ASSOC); if ($line) return $line; } Function numrows($query) { $this->result = mysql_query($query); $line = mysql_num_rows($this->result); if ($line) return $line; } } ?> ..:: Cafe Bar Schabanak - Das Inn Lokal in Villach ::..