par zeus » 18 mai 2005, 11:00
par Justone » 18 mai 2005, 10:58
par zeus » 18 mai 2005, 10:47
par Justone » 18 mai 2005, 10:39
SELECT jour, mois, annee, type, sla, total, description, action FROM sla WHERE annee=".$annee." ORDER BY annee, mois, jour;
par Justone » 18 mai 2005, 10:35
par zeus » 18 mai 2005, 10:35
Si tu utilise EasyPHP, je te conseille de faire afficher ta requete après l'avoir construite et de l'exécuter depuis phpMyAdmin, ca te donnera une erreur plus simple à comprendre
par Justone » 18 mai 2005, 10:19
Sinon, HAVING n'est a utilisé que après un GROUP BY Ta requete, je l'écrirais plutot : $str_requete ="SELECT jour, mois, annee, type, sla, total, description, action FROM sla WHERE annee=".$annee." ORDER BY annee, mois, jour";
$str_requete ="SELECT jour, mois, annee, type, sla, total, description, action FROM sla WHERE annee=".$annee." ORDER BY annee, mois, jour";
par zeus » 18 mai 2005, 10:14
par Justone » 18 mai 2005, 10:11
par zeus » 18 mai 2005, 10:10
par zeus » 18 mai 2005, 10:09
par Justone » 18 mai 2005, 10:07
$annee=$_POST["annee"]; $str_requete ="SELECT jour, mois, annee, type, sla, total, description, action FROM sla ORDER BY annee, mois, jour HAVING annee=".$annee; $o_result = mysql_query($str_requete); while ($a_result = mysql_fetch_array($o_result, MYSQL_ASSOC)) {
par zeus » 18 mai 2005, 09:49
<html> <head> <title>page</title> </head> <body> <table> <tr> <td>Mois</td> <td>Annee</td> </tr> <?php $annee=$_POST["menuderoulant"]; $str_requete ="SELECT mois, annee FROM table WHERE annee=".$annee; $o_result = mysql_query($str_requete) while ($a_result = mysql_fetch_array($o_result, MYSQL_ASSOC)) { echo "<tr>"; echo "<td>".$a_result["mois"]."</td>"; echo "<td>".$a_result["annee"]."</td>"; echo "</tr>"; } ?> </table> </body> </html>
par Justone » 18 mai 2005, 09:42
<html> <head> <title>page</title> </head> <body> <table> <tr> <td>Mois</td> <td>Annee</td> </tr> <?php $str_requete ="SELECT mois, annee FROM table"; $o_result = mysql_query($str_requete) while ($a_result = mysql_fetch_array($o_result, MYSQL_ASSOC)) { echo "<tr>"; echo "<td>".$a_result["mois"]."</td>"; echo "<td>".$a_result["annee"]."</td>"; echo "</tr>"; } ?> </table> </body> </html>
par Justone » 17 mai 2005, 15:16