diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:29:21 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:29:21 +0200 |
commit | 4f0df31cc153855d099e4c06228a6cf1bf51eeca (patch) | |
tree | 0c93c6b44d7b7025935d822d4209172ef0eef2b8 /beta_old1/fct_adm.inc.php | |
parent | 19cdd5e2fde57d53f05570cd50f5ffd223182566 (diff) | |
download | 2007-AWOR-4f0df31cc153855d099e4c06228a6cf1bf51eeca.tar.gz 2007-AWOR-4f0df31cc153855d099e4c06228a6cf1bf51eeca.tar.bz2 2007-AWOR-4f0df31cc153855d099e4c06228a6cf1bf51eeca.zip |
Version beta_old1 (sans la doc) 2007-02-22+15:00 - 2007-03-11+16:41:00
Diffstat (limited to 'beta_old1/fct_adm.inc.php')
-rw-r--r-- | beta_old1/fct_adm.inc.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/beta_old1/fct_adm.inc.php b/beta_old1/fct_adm.inc.php new file mode 100644 index 0000000..1b68b06 --- /dev/null +++ b/beta_old1/fct_adm.inc.php @@ -0,0 +1,33 @@ +<?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'); + +?>
\ No newline at end of file |