| | |
| | | $this->dbName = $conf["db_database"]; |
| | | $this->dbUser = $conf["db_user"]; |
| | | $this->dbPass = $conf["db_password"]; |
| | | $this->dbCharset = $conf['db_charset']; |
| | | //$this->connect(); |
| | | } |
| | | |
| | |
| | | function updateError($location) |
| | | { |
| | | global $app; |
| | | $this->errorNumber = mysql_errno(); |
| | | $this->errorMessage = mysql_error(); |
| | | $this->errorNumber = mysql_errno($this->linkId); |
| | | $this->errorMessage = mysql_error($this->linkId); |
| | | $this->errorLocation = $location; |
| | | if($this->errorNumber && $this->show_error_messages && method_exists($app,'log')) |
| | | { |
| | |
| | | $this->updateError('DB::connect()-> mysql_connect'); |
| | | return false; |
| | | } |
| | | $this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId); |
| | | $this->queryId = @mysql_query("SET character_set_results = '".$this->dbCharset."', character_set_client = '".$this->dbCharset."', character_set_connection = '".$this->dbCharset."', character_set_database = '".$this->dbCharset."', character_set_server = '".$this->dbCharset."'", $this->linkId); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | return $out; |
| | | } |
| | | |
| | | |
| | | /* |
| | | //* These functions are deprecated and will be removed. |
| | | function insert($tablename,$form,$debug = 0) |
| | | { |
| | | if(is_array($form)){ |
| | |
| | | if($debug == 1) echo "mySQL Error Message: ".$this->errorMessage; |
| | | } |
| | | } |
| | | */ |
| | | |
| | | public function closeConn() |
| | | { |