pour moi y'a pas d'erreur pourtant jai des notice d'index inexistant pour appel (alor qu'il sont créé et copié collé de la page précédente)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109 <?php session_start(); include ("C:\Program Files\EasyPHP1-8\php\jpgraph-1.20.4\src\jpgraph.php"); include ("C:\Program Files\EasyPHP1-8\php\jpgraph-1.20.4\src\jpgraph_line.php"); $queryid=$_SESSION['queryid']; $count=$_SESSION['nappel']; $nbcols=$_SESSION['nbcols']; $query = $_SESSION['request']; $conn = ocilogon('as_read', 'as_read.astest', 'ASTEST.ACTELION.COM'); //connection to the oracle database $stid = ociparse($conn, $query);//prepare the query $r = ociexecute($stid, OCI_DEFAULT);//execute the query $ncols = OCINumCols($stid); // give the number of columns for ( $i=0 ;$i <= $count; $i++)//$i = column number { $appel[$i]=$_SESSION["appel$i"]; } $count=0; while (OCIFetchInto ($stid, $ligne, OCI_RETURN_LOBS+OCI_RETURN_NULLS))//read one line of the answer table { for ( $i=0 ;$i < $count; $i++)//$i = column number { $j=$appel[$i]; switch($i) { case 1: $array1[$count]=$ligne[$j] ;//write the answer in the table break; case 2: $array2[$count]=$ligne[$j] ;//write the answer in the table break; case 3: $array3[$count]=$ligne[$j] ;//write the answer in the table break; case 4: $array4[$count]=$ligne[$j] ;//write the answer in the table break; case 5: $array5[$count]=$ligne[$j] ;//write the answer in the table } } $count++;//increase the line meter } $conn = ocilogon('query_user', 'password', 'asq'); $query="select query_label from queries_q where query_id = $queryid"; $stid = ociparse($conn, $query);//prepare the querie $r = ociexecute($stid, OCI_DEFAULT);//execute the querry $ncols = OCINumCols($stid); // give the number of columns OCIFetchInto ($stid, $ligne, OCI_NUM );//read 1 line of the result table $graphname=$ligne[0]; // Creation du graphique. Ces deux fonctions sont obligatoirement utilisées $graph = new Graph(350,250,"auto"); $graph->SetScale("$graphname"); for ( $i=0 ;$i < $nbcols; $i++)//$i = column number { $j=$appel[$i]; $j++; $column_name= ocicolumnname($stid, $j); // ocicolumnname return the column name switch($i) { case 1: // Creation de la courbe $lineplot1=new LinePlot($array1); $lineplot1->SetColor("blue"); // Ajout de la courbe sur le graphque $graph->Add($lineplot1); case 2: // Creation de la courbe $lineplot2=new LinePlot($array2); $lineplot2->SetColor("red"); // Ajout de la courbe sur le graphque $graph->Add($lineplot2); case 3: // Creation de la courbe $lineplot3=new LinePlot($array3); $lineplot3->SetColor("yellow"); // Ajout de la courbe sur le graphque $graph->Add($lineplot3); case 4: // Creation de la courbe $lineplot4=new LinePlot($array4); $lineplot4->SetColor("green"); // Ajout de la courbe sur le graphque $graph->Add($lineplot4); case 5: // Creation de la courbe $lineplot5=new LinePlot($array5); $lineplot5->SetColor("navy"); // Ajout de la courbe sur le graphque $graph->Add($lineplot5); } } // Affichage du graphique $graph->Stroke(); ?>
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
72
73
74
75
76
77 <?php session_start(); $_SESSION['nbcols']=$_POST['glinenum']; $query = $_SESSION['request']; error_reporting(E_ALL & ~E_NOTICE); //$user = $_POST('user'); //$pass = $_POST('pass'); //$database = $_POST('database'); $conn = ocilogon('as_read', 'as_read.astest', 'ASTEST.ACTELION.COM'); //connection to the oracle database $stid = ociparse($conn, $query);//prepare the query $r = ociexecute($stid, OCI_DEFAULT);//execute the query $ncols = OCINumCols($stid); // give the number of columns for ( $i=1 ;$i < $ncols+1; $i++)//$i = column number { $value[$i]=$_POST["value$i"]; } $count=0; for ( $i=1 ;$i < $ncols+1; $i++)//$i = column number { if($value[$i]=='') { } else { $_SESSION["appel$count"]=$value[$i]; $count++; } } $_SESSION['nappel']=$count; echo "<HTML> <head> <title>your result</title></HEAD> <BODY><FORM METHOD='POST' action='querieschoose.php4' TARGET='main'><INPUT TYPE=submit VALUE=back></FORM><TABLE BORDER=1> "; echo "<THEAD bgcolor=#9A9A9A>"; for ( $i=1 ;$i < $ncols+1; $i++)//$i = column number { $column_name= ocicolumnname($stid, $i); // ocicolumnname return the column name echo "<TH> $column_name </TH>"; } echo "</THEAD> <TBODY>"; $count =0; while (OCIFetchInto ($stid, $ligne, OCI_RETURN_LOBS+OCI_RETURN_NULLS))//read one line of the answer table { echo "<TR>"; for ( $i=0 ;$i < $ncols; $i++)//$i = column number { if(trim($ligne[$i])=="")//test if the case is null { echo "<TD><FONT color=#A0A0A0><B> (null) </B></FONT></TD>";//write null in the table } else { echo "<TD> $ligne[$i] </TD>" ;//write the answer in the table } } echo "</TR> "; $count++;//increase the line meter } echo "</table></TBODY>" ; //$query2 = 'select \'Query run against \'||global_name||\' and valid as of \'||to_char(sysdate,\'dd-mon-yyyy\') from global_name'; $query2 = 'select \'Query run by \'||osuser||\' against \'||global_name||\' and valid as of \'||to_char(sysdate,\'dd-mon-yyyy\') from global_name,v$session WHERE sid = (SELECT sid FROM v$mystat WHERE rownum = 1) '; $stid = ociparse($conn, $query2); $r = ociexecute($stid, OCI_DEFAULT); OCIFetchInto ($stid, $ligne, OCI_RETURN_LOBS); echo "<TABLE BORDER=1> <THEAD> <TH> N-Line </TH><TH> Info</TH> </THEAD>"; echo "<TBODY>"; echo" <TR><TD> $count </TD><TD> $ligne[0]</TD> </TR>";//post the number of line echo" </TBODY> </TABLE> <a href='graph.php'>graph</A> <FORM METHOD='POST' action='telecharger.php' TARGET='main'><INPUT TYPE=submit VALUE=download></FORM> <FORM METHOD='POST' action='querieschoose.php4' TARGET='main'><INPUT TYPE=submit VALUE=back></FORM> </BODY> </HTML>"; echo $query; //post the query after the table OCILogoff($conn); ?>
mais je comprend pas il n'y a aucune erreur pour moi puisque la session 'nappel' passe corectement si quelqu'un a de meilleur yeux que moi ...
Partager