<?php function html_generate_MySQLTable($table, $columns='*', $where_clause='', $row_begin='', $row_end='') { require_once('app/include/ludo/html_elements.inc.php'); require_once('app/include/connect.inc.php'); if ( $where_clause !== '' ) { $where_clause="WHERE $where_clause"; } $query = "SELECT $columns FROM $table $where_clause;"; echo "DEBUG : $query\n"; if ( ! $result = @mysql_query($query) ) { return "Erreur de g�n�ration de la table $table\n"; } else { $row = mysql_fetch_assoc($result); // Affichage des ent�tes du tableau echo "<table>\n<thead>\n<tr>\n"; echo "$row_begin<td>" . implode("</td>\n<td>",array_keys($row)) . "</td>$row_end\n"; echo "</tr>\n</thead>\n<tbody>\n"; do { echo "<tr>\n\t<td>" . implode("</td>\n<td>",$row) . "</td>\n</tr>\n"; } while ( $row = mysql_fetch_assoc($result) ); echo "</tbody>\n</table>\n"; } } html_generate_MySQLTableSuppr('AWOR_Reunion','idR'); ?>