1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
function ExecuteRequete()
{
if (! IsConnectId($GLOBALS[$this->Base_Appelee]["ID_CON"]))
{
// echo "<br> ***".$GLOBALS[$this->Base_Appelee]["ID_CON"];
ConnectBase($GLOBALS[$this->Base_Appelee]["ID_CON"],$this->Base_Appelee);
// A supprimer
// if (! IsConnectId($this->IdCon))
// echo "<br> **** Non Connecte";
// FIN A supprimer
}
if ($this->TypeSql == "S")
{
// $kk=ociparse($this->IdCon,"ALTER SESSION SET NLS_COMP='ANSI'");
// $a=ociexecute($kk);
$this->IdRes = ociparse($GLOBALS[$this->Base_Appelee]["ID_CON"],$this->SqlExec);
if (! IsResultId($this->IdRes) )
{
$this->RemplissageRetour(9990,"La Requete a echouee","EP");
return false;
}
$ok = ociexecute($this->IdRes);
if ( !$ok)
{
$this->RemplissageRetour(9990,"La Requete a echouee","EP");
return false;
}
$res = array();
$this->NbLigne = ocifetchstatement($this->IdRes,$res,0,-1,OCI_FETCHSTATEMENT_BY_ROW);
if ($this->NbLigne > 0)
$this->Result = $res;
//print_r($this->NbLigne);
ocifreestatement($this->IdRes); //libre les resultats
} |
Partager