Bonjour,

j'ai un problem d'affichage d'une variable mais
on affiche toujours "Resource id #5 " mais je sais pas ou est probleme?
et voila code source dans la meme page
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
 
  include "conn/conn.php"; 
  $id=@$_GET['id']; 
  $_nom_=@$_GET["_nom_"];
  $_prenom_=@$_GET["_prenom_"];
  $_struct_=@$_GET["_struct_"];
  $_std_=@$_GET["_std_"];
  $_dir_=@$_GET["_dir_"]; 
  $_idpers_=@$_GET["_idpers_"]; 
 
  $newstd=@$_POST['newstd'];
  $lieu=@$_POST['lieu'];
  $typestd=@$_POST['typestd'];
  $groupestd=@$_POST['groupestd'];
  $cachestd=@$_POST['cachestd'];
 
  $idm=@$_GET['idm'];
  $stdm=@$_GET['stdm'];
  $maj=@$_GET['maj'];
  $del=@$_GET['del'];
echo $maj; // affiche m
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
if($del=="d") {
	$req2="delete from agstd where n_standard like '".$stdm."%' and iu='".$id."'";
	     $maj=ora_open($conn);
		if($maj) {
		    $parse=ora_parse($maj, $req2) or die ("error");
		    $exec=ora_exec($maj);
		    $a=ora_commit($conn);
		    $b=ora_close($maj);
		}
	}
 
 
 if(is_numeric($newstd) and strlen($newstd)>=1 and strlen($newstd)<=4 and $lieu ) { // and $typestd and $cachestd and $groupestd and $lieu) {
  	 $std=$newstd."/".$lieu;
  	 if($maj=="a") {
  	 $req="insert into standard (n_standard, cache, touche) values('".$std."',".$cachestd.",".$typestd.")";
	     $maj=ora_open($conn);
		if($maj) {
		    $parse=ora_parse($maj, $req);
		    $exec=ora_exec($maj);
		    $a=ora_commit($conn);
		    $b=ora_close($maj);
		}
	$req="insert into agstd (iu, n_standard) values ('".$id."','".$newstd."')";
	     $maj=ora_open($conn);
		if($maj) {
		    $parse=ora_parse($maj, $req);
		    $exec=ora_exec($maj);
		    $a=ora_commit($conn);
		    $b=ora_close($maj);
		}
	}
 
	if($maj=="m") {
    $req="update standard set";
  		if( $std) {
		$req.=" n_standard='".$std."'";
		}
		if( $std and $typestd) {
		$req.=", ";
		}
		if($typestd) {
		$req.=" touche=".$typestd;
		}
		if( $cachestd and ($std or $typestd )) {
		$req.=", ";
		}
		if($cachestd)  {
		$req.=" cache=".$cachestd;
		}
	$req.=" where n_standard like '".$stdm."%'";
	//echo $req;
	     $maj=ora_open($conn);
		if($maj) {
		    $parse=ora_parse($maj, $req);
		    $exec=ora_exec($maj);
		    $a=ora_commit($conn);
		    $b=ora_close($maj);
		}
	}
	$req2 ="update agstd set n_standard='".$std."' where n_standard like '".$stdm."%' and iu='".$id."'";
	$maj=ora_open($conn);
		if($maj) {
		    $parse=ora_parse($maj, $req2);
		    $exec=ora_exec($maj);
		    $a=ora_commit($conn);
		    $b=ora_close($maj);
		}
	}
echo $maj; // Ressource id #5
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
 
$open14 = ora_open($conn) or die ('Could not connect.'.ora_error());
    $sql14="select a.iu, nom, prn, r.n_standard, touche, cache, groupe
	from pers.tagent a, agstd s, standard r
	where a.iu=s.iu
	and s.n_standard=r.n_standard
	and s.n_standard like '".$stdm."%'
	and a.iu='".$id."'
	and posi=1";
        $parse = ora_Parse($open14, $sql14) or die ('select '.ora_error());
	$execute = ora_Exec($open14) or die ('Execution not made.'.ora_error());
    $idsm=array();
	$nomsm=array();
	$prnsm=array();
    $stdsm=array();
	$touchesm=array();
	$cachesm=array();
	$groupesm=array();
	while(ora_fetch($open14)) {
		array_push($idsm,ora_getcolumn($open14, 0));
        array_push($nomsm,ora_getcolumn($open14, 1));
	    array_push($prnsm,ora_getcolumn($open14, 2));
	    array_push($stdsm,ora_getcolumn($open14, 3));
		array_push($touchesm,ora_getcolumn($open14, 4));
		array_push($cachesm,ora_getcolumn($open14, 5));
		array_push($groupesm,ora_getcolumn($open14, 6));
        }
   echo $maj; // Ressource id #5
pouvez-vous trouver une cette solution?
Merci.