modules/opendata/lib/Convertor.php
public function connect($server,$user,$password,$database){
		if(empty($this->database_info['server']) || $this->database_info['server']==''){
			$this->database_info['server'] = $server;
		}
		if(empty($this->database_info['user']) || $this->database_info['user']==''){
			$this->database_info['user'] = $user;
		}
		if(empty($this->database_info['pass']) || $this->database_info['pass']==''){
			$this->database_info['pass'] = $password;
		}
		if(empty($this->database_info['database']) || $this->database_info['database']==''){
			$this->database_info['database'] = $database;
		}

		mysql_connect(
		$this->database_info['server'],
		$this->database_info['user'],
		$this->database_info['pass']
		);
		@mysql_select_db($this->database_info['database']) or die("Unable to connect to ".$this->database_info['database']." database.");
	}
public function connect($server,$user,$password,$database){
		if(empty($this->database_info['server']) || $this->database_info['server']==''){
			$this->database_info['server'] = $server;
		}
		if(empty($this->database_info['user']) || $this->database_info['user']==''){
			$this->database_info['user'] = $user;
		}
		if(empty($this->database_info['pass']) || $this->database_info['pass']==''){
			$this->database_info['pass'] = $password;
		}
		if(empty($this->database_info['database']) || $this->database_info['database']==''){
			$this->database_info['database'] = $database;
		}

		mysql_connect(
		$this->database_info['server'],
		$this->database_info['user'],
		$this->database_info['pass']
		);
		@mysql_select_db($this->database_info['database']) or die("Unable to connect to ".$this->database_info['database']." database.");
	}
public function connect ( $ server , $ user , $ password , $ database ) { if ( empty ( $ this -> database_info [ 'server' ] ) || $ this -> database_info [ 'server' ] == '' ) { $ this -> database_info [ 'server' ] = $ server ; } if ( empty ( $ this -> database_info [ 'user' ] ) || $ this -> database_info [ 'user' ] == '' ) { $ this -> database_info [ 'user' ] = $ user ; } if ( empty ( $ this -> database_info [ 'pass' ] ) || $ this -> database_info [ 'pass' ] == '' ) { $ this -> database_info [ 'pass' ] = $ password ; } if ( empty ( $ this -> database_info [ 'database' ] ) || $ this -> database_info [ 'database' ] == '' ) { $ this -> database_info [ 'database' ] = $ database ; } mysql_connect ( $ this -> database_info [ 'server' ] , $ this -> database_info [ 'user' ] , $ this -> database_info [ 'pass' ] ) ; @ mysql_select_db ( $ this -> database_info [ 'database' ] ) or die ( "Unable to connect to " . $ this -> database_info [ 'database' ] . " database." ) ; }
Connect to the database, using credentials
Credentiel input in constructor have priority

@param unknown $server
@param unknown $user
@param unknown $password
@param unknown $database
Connect to the database using credentials Credentiel input in constructor have priority