MOD MySQL est remplacé par PostgreSQL (fini)
[cl7.git] / php / participants.php
index 995752b..e71e59a 100644 (file)
@@ -13,11 +13,10 @@ function ON($condition)
        return $condition ? 'Oui' : 'Non';
 }
 
-#connection à la base de données
-$lien_mysql = mysql_connect ($SQL_HOTE, $SQL_LOGIN, $SQL_PASS);
-mysql_select_db ($NOM_BASE);
+#connexion à la base de données
+$conn_bd = pg_connect(sprintf("host=%s dbname=%s user=%s password=%s", $SQL_HOTE, $NOM_BASE, $SQL_LOGIN, $SQL_PASS));
 
-$requ = mysql_query("select * from participants order by pseudo");
+$requ = pg_query("select * from participants order by pseudo");
 
 echo
 '<table width="100%" border="2" cellpadding="2" cellspacing="2"><tr>
@@ -34,7 +33,7 @@ echo
 </tr>
 ';
 
-while($participant = mysql_fetch_object($requ))
+while($participant = pg_fetch_object($requ))
 {
        echo '<tr>',
                '<td>',$participant->pseudo,'</td>',