X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=blobdiff_plain;f=php%2Fpages%2Finscrits.php;h=a28efdbd2922846ab60e37069d45f4ecb0e9e677;hp=ad266450084a727a8505edd7a21fd19465e5ee27;hb=23bc2016d5fbd8f7daa9b7ba5c7fa862709ff7a7;hpb=75d6e5d29bfe332d68c617d26e3a8b1828a57893 diff --git a/php/pages/inscrits.php b/php/pages/inscrits.php index ad26645..a28efdb 100644 --- a/php/pages/inscrits.php +++ b/php/pages/inscrits.php @@ -2,20 +2,20 @@ include_once("php/traitement_pre_affichage.php"); -$participants = mysql_query(" +$participants = pg_query(" SELECT id, pseudo, nom, prenom, clan_nom, clan_tag, remarques FROM participants - ORDER by clan_nom, clan_tag, pseudo + ORDER by clan_nom NULLS FIRST, clan_tag NULLS FIRST, pseudo "); -$periodes = mysql_query("SELECT nom_abrege FROM periodes ORDER BY id"); +$periodes = pg_query("SELECT nom_abrege FROM periodes ORDER BY id"); $debut_table = ' pseudo nom prénom'; $nb_periode = 0; -while($periode = mysql_fetch_object($periodes)) +while($periode = pg_fetch_object($periodes)) { $debut_table .= ''.$periode->nom_abrege.''; $nb_periode++; @@ -23,10 +23,10 @@ while($periode = mysql_fetch_object($periodes)) $debut_table .= 'remarques '; -$clan_courant = null; +$clan_courant = "PHP c'est du CACA"; echo ''; -while($participant = mysql_fetch_object($participants)) +while($participant = pg_fetch_object($participants)) { if ($clan_courant !== $participant->clan_nom) { @@ -34,18 +34,18 @@ while($participant = mysql_fetch_object($participants)) $clan_courant = $participant->clan_nom; } - $participations = mysql_query(" + $participations = pg_query_params(" SELECT periodes.nom, participations.participant_id FROM periodes - LEFT JOIN participations ON periodes.id = participations.periode_id AND participations.participant_id = ".$participant->id." + LEFT JOIN participations ON periodes.id = participations.periode_id AND participations.participant_id = $1 ORDER BY id - "); + ", array($participant->id)); echo ''; echo ''; echo ''; echo ''; - while ($participation = mysql_fetch_object($participations)) - echo ''; + while ($participation = pg_fetch_object($participations)) + echo ''; echo ''; echo '';
', htmlentities($participant->clan_tag, ENT_QUOTES, "UTF-8"), traitement_pre_affichage($participant->pseudo), '', traitement_pre_affichage($participant->nom), '', traitement_pre_affichage($participant->prenom), 'participant_id == $participant->id ? 'class="participe"' : '').'>participant_id == $participant->id ? 'class="participe"' : '').'>', traitement_pre_affichage($participant->remarques), '