DB connector Class

Uses: calling the DB for any kind of query or starting/closing a connection and other useful functions
Usage: To make your DB connection simple and somewhat secure
Must have config.php for it to work correctly, or another way for to get DB logon info…this is my older version of this file, the other was just lost on a crash, there are just a few minor changes i have to make, but should work fine

link = mysql_connect($host, $user, $pass);
mysql_select_db($db);
register_shutdown_function(array(&$this, 'close'));
return $this->link;
}
//*** Function: query, Purpose: Execute a database query ***
function query($query) {
$this->theQuery = $query;
return mysql_query($query, $this->link);

}
//*** Function: fetchArray, Purpose: Get array of query results ***
function fetchArray($result) {
return mysql_fetch_array($result);
}
//*** Function: close, Purpose: Close the connection ***
function close() {
mysql_close($this->link);
}
//***Function: return the last row inserted into database***
function row() {
$pkey = mysql_insert_id($this->link);
return $pkey;
}
} //end of class
?>