Faire un select dans un table
msi79
Messages postés
537
Statut
Membre
-
anatolekadel Messages postés 112 Statut Membre -
anatolekadel Messages postés 112 Statut Membre -
salut j'ai une table a partir de laquelle je veux faire un select mais je reçois cette erreur :
Parse error: parse error in C:\wamp\www\Monsite\liste_4eme5.php on line 60
alors je vous prie de bien vouloir m'aider . merci d'avance
*********************************************************************
voici mon code :
*********************************************************************
<?php
$_POST["NOM"]=""; $_POST["PRENOM"]=""; $_POST["CLASSE"]='';
$NOM=trim($_POST["NOM"]);
$PRENOM=trim($_POST["PRENOM"]);
$CLASSE=trim($_POST["CLASSE"]);
$color=array('#333333','#999999');
$i=0;
// on se connecte à ORACLE situé sur redhat 5
$conn = oci_connect("user", "mdp", '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcldb)
(INSTANCE_NAME = orcldb)
(GLOBAL_NAME = orcldb)
))');
// on crée la requête SQL
$sql = "SELECT NOM,PRENOM,CLASSEFROM eleve WHERE CLASSE='5eme3' ORDER BY NOM ASC";
$result = oci_parse($sql);
$req = oci_execute($result);
?>
<?php
while ($liste_etu=oci_fetch_assoc($result)) {
$j=$i%2;
?>
<tr bgcolor=#33FFFF>
<td><?php echo $liste_etu['NOM'] ?></td>
<td><?php echo $liste_etu['PRENOM'] ?></td>
<td><?php echo $liste_etu['CLASSE'] ?></td>
</tr>
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<style type="text/css">
<!--
.Style3 {color: #FFFFFF}
.Style4 {color: #FFFFFF; font-weight: bold; }
.Style5 {
color: #CCCCCC;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div align="center">
<h1><a href="MonSiteOK.php" title="click pour voir votre Note !!!!" class="Style5">
<input type="image" name="imageField" src="btmylod_1.png" />
</a><em>>>> LISTE DES ELEVES DE 4ème 5 </em> <<<
</h1>
</div>
<p> </p>
<table width="729" border="0" align="center" cellspacing="2">
<tr bgcolor="#999999">
<th width="233" scope="row"><span class="Style3">NOM</span></th>
<td width="274"><div align="center" class="Style4">PRENOM</div></td>
<td width="208"><div align="center" class="Style4">CLASSE</div></td>
</tr>
}
</table>
</body>
</html>
Parse error: parse error in C:\wamp\www\Monsite\liste_4eme5.php on line 60
alors je vous prie de bien vouloir m'aider . merci d'avance
*********************************************************************
voici mon code :
*********************************************************************
<?php
$_POST["NOM"]=""; $_POST["PRENOM"]=""; $_POST["CLASSE"]='';
$NOM=trim($_POST["NOM"]);
$PRENOM=trim($_POST["PRENOM"]);
$CLASSE=trim($_POST["CLASSE"]);
$color=array('#333333','#999999');
$i=0;
// on se connecte à ORACLE situé sur redhat 5
$conn = oci_connect("user", "mdp", '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcldb)
(INSTANCE_NAME = orcldb)
(GLOBAL_NAME = orcldb)
))');
// on crée la requête SQL
$sql = "SELECT NOM,PRENOM,CLASSEFROM eleve WHERE CLASSE='5eme3' ORDER BY NOM ASC";
$result = oci_parse($sql);
$req = oci_execute($result);
?>
<?php
while ($liste_etu=oci_fetch_assoc($result)) {
$j=$i%2;
?>
<tr bgcolor=#33FFFF>
<td><?php echo $liste_etu['NOM'] ?></td>
<td><?php echo $liste_etu['PRENOM'] ?></td>
<td><?php echo $liste_etu['CLASSE'] ?></td>
</tr>
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<style type="text/css">
<!--
.Style3 {color: #FFFFFF}
.Style4 {color: #FFFFFF; font-weight: bold; }
.Style5 {
color: #CCCCCC;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div align="center">
<h1><a href="MonSiteOK.php" title="click pour voir votre Note !!!!" class="Style5">
<input type="image" name="imageField" src="btmylod_1.png" />
</a><em>>>> LISTE DES ELEVES DE 4ème 5 </em> <<<
</h1>
</div>
<p> </p>
<table width="729" border="0" align="center" cellspacing="2">
<tr bgcolor="#999999">
<th width="233" scope="row"><span class="Style3">NOM</span></th>
<td width="274"><div align="center" class="Style4">PRENOM</div></td>
<td width="208"><div align="center" class="Style4">CLASSE</div></td>
</tr>
}
</table>
</body>
</html>
A voir également:
- Faire un select dans un table
- Table ascii - Guide
- Table des matières word - Guide
- Table des annexes word ✓ - Forum Word
- Dans le fichier, générez ce tableau automatiquement (tableau croisé dynamique ou table de pilote) à partir des quatre premières colonnes. - Guide
- Table des caractères - Guide