Bonjour,
voici le code qui exécute une requête "select" pour une base de données oracle,le problème c'est au niveau de la récupération des données ,il ne m'affiche pas deux colonnes et les données sont mélangées, je sais pas à quel niveau ça ne passe pas?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
44
//EXECUTION DE LA REQUETE PASSEE EN PARAMETRE (SELECT)
	function execute($query)
	{
              error_reporting(0);
		if (($this->verif != "nok") && ($this->verif != "ok"))
		{
			$this->verif = "nok";
		}
		else
		{			
	      $stid=oci_parse( $this->connection, $query);
	      oci_execute($stid, OCI_COMMIT_ON_SUCCESS);
	      $row=array();	
		  $tab=array();			
		  $nrows = oci_fetch_all($stid, $results);
		  $this->nbresults=$nrows;
		  if ($nrows > 0)
			{   
              for ($i = 0; $i < $nrows; $i++) 
			   {  
				   $tab=array(); 
				   $compteur=1;				
 
				   foreach ($results as $data) 
					  {
						   $tab[oci_field_name($stid, $compteur)] = $data[$i];		  			  
						   $compteur++; 	
					  } 
 
					array_push($this->results, $tab);						
			    }
 
 
				$this->verif1 = "ok";
            } 
		   else 
			 {
                $this->verif1 = "nok";
             }			                
       }
 
		error_reporting(1);		
	return $this->verif1;
	}
Merci de votre aide.