| | |
| | | <?php |
| | | |
| | | /* |
| | | Copyright (c) 2007, Till Brehm, projektfarm Gmbh |
| | | Copyright (c) 2005, Till Brehm, projektfarm Gmbh |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | |
| | | var $dbName = ""; // logical database name on that server |
| | | var $dbUser = ""; // database authorized user |
| | | var $dbPass = ""; // user's password |
| | | var $dbCharset = ""; // what charset comes and goes to mysql: utf8 / latin1 |
| | | var $linkId = 0; // last result of mysql_connect() |
| | | var $queryId = 0; // last result of mysql_query() |
| | | var $record = array(); // last record fetched |
| | |
| | | $this->dbName = $conf["db_database"]; |
| | | $this->dbUser = $conf["db_user"]; |
| | | $this->dbPass = $conf["db_password"]; |
| | | $this->dbCharset = $conf["db_charset"]; |
| | | //$this->connect(); |
| | | } |
| | | |
| | |
| | | $this->updateError('DB::connect()<br />mysql_connect'); |
| | | return false; |
| | | } |
| | | $this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | function closeConn() { |
| | | |
| | | public function closeConn() |
| | | { |
| | | if($this->linkId) |
| | | { |
| | | mysql_close($this->linkId); |
| | | return true; |
| | | } else { return false; } |
| | | } |
| | | |
| | | function freeResult() { |
| | | |
| | | |
| | | public function freeResult($query) |
| | | { |
| | | if(mysql_free_result($query)) |
| | | { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | function delete() { |