| | |
| | | $this->dbCharset = $conf["mysql"]["charset"]; |
| | | $this->dbNewLink = false; |
| | | $this->dbClientFlags = null; |
| | | } |
| | | |
| | | public function __destruct() { |
| | | if($this->_iConnId) mysqli_close($this->_iConnId); |
| | | } |
| | | |
| | | private function connect() { |
| | | if($this->_iConnId) return true; |
| | | |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | $try = 0; |
| | | while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { |
| | |
| | | |
| | | $this->_setCharset(); |
| | | } |
| | | |
| | | public function __destruct() { |
| | | if($this->_iConnId) mysqli_close($this->_iConnId); |
| | | } |
| | | |
| | | |
| | | public function close() { |
| | | if($this->_iConnId) mysqli_close($this->_iConnId); |
| | | $this->_iConnId = null; |
| | |
| | | private function _query($sQuery = '') { |
| | | global $app; |
| | | |
| | | $this->connect(); |
| | | |
| | | //if($this->isConnected == false) return false; |
| | | if ($sQuery == '') { |
| | | $this->_sqlerror('Keine Anfrage angegeben / No query given'); |