1
0
mirror of https://github.com/agdsn/ancient-weatherstation.git synced 2026-06-19 23:07:59 +00:00

Frontend module vor Rain added

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@27 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi
2006-08-18 19:43:54 +00:00
parent 1b6938fa41
commit 7d9466a0d2
5 changed files with 42 additions and 19 deletions
+8 -2
View File
@@ -1,12 +1,15 @@
<?
/* Connection-Klasse..ist für die Datenbankverbindung zuständig */
class Connection{
var $conn = NULL;
var $conn = NULL; /* Verbindung */
/* Konstruktor */
function Connection(){
$this->conn = NULL;
}
/* Verbindung herstellen (wenn noch net besteht)*/
function _createConn(){
if($this->conn == NULL){
$this->conn = pg_connect("host=141.30.228.39 dbname=wetter user=losinshi")
@@ -14,6 +17,7 @@ class Connection{
}
}
/* Verbindung schließen */
function closeConn(){
if($this->conn != NULL){
pg_close($this->conn);
@@ -21,6 +25,7 @@ class Connection{
}
}
/* Eine Zeile holen */
function fetchQueryResultLine($query){
$this->_createConn();
$result = pg_query($this->conn, $query)
@@ -30,6 +35,7 @@ class Connection{
return $array;
}
/* mehrere Zeilen holen */
function fetchQueryResultSet($query){
$returnArray = array();
$this->_createConn();