Código PHP:
require('config.inc.php');
class DB_Management{
var $conn;
var $rs;
var $ar;
function DB_Connect(){
$this->$conn = mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD);
mysql_select_db(DB_NAME,$this->$conn);
return $this->$conn;
}
function DB_DoConsult($sql){
$this->$rs=mysql_query($sql,$this->DB_Connect());
return $this->$rs;
}
function DB_Array($link){
$this->$ar=mysql_fetch_array($link);
return $this->$ar;
}
}