Código PHP:
include ('./adodb5/adodb.inc.php');
include ('./adodb5/adodb-pager.inc.php');
include ('./adodb5/adodb-exceptions.inc.php');
Class GestorBD{
private $ip_servidor;
private $user;
private $password;
private $sid;
public $BD;
/*public static function getInstance(){
return $BD;
}*/
/*public getBD(){
return $this->BD;
}*/
public function __construct(){
$this-> BD = ADONewConnection('oci8');
$this-> connectSID = true;
//Datos de conexion
//$ip_servidor ="10.0.0.5"; //Sí Php y Oracle están en la misma máquina
$this-> ip_servidor ="192.168.1.32"; //Sí Php y Oracle están en la misma máquina
//en caso contrario incluir la ip del servidor oracle
$this-> user ="f1";
$this-> password ="f1";
$this-> sid ="BD";
//Conexion
//$this-> BD =
$this->BD->PConnect($this->ip_servidor, $this->user, $this->password, $this->sid);
}
public function getConsulta($sql){
//$recordSet = $this->BD->Execute($sql);
if (/*!$recordSet*/$this->BD->Execute($sql)){
return true;
//print $con->ErrorMsg();
}else {
print false;
}
}
}
Gracias!!!