diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:37:30 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-06-30 11:37:30 +0200 |
commit | 5dac82f52f45ad27f16ec2ff63ee75e2f39ef942 (patch) | |
tree | 62cf671332976c83024139fc4c22009b382d45ff /beta_accents/fct_adm.inc.php | |
parent | 34795da1b6bd714df0d5dce93558e04b2bb8a287 (diff) | |
download | 2007-AWOR-5dac82f52f45ad27f16ec2ff63ee75e2f39ef942.tar.gz 2007-AWOR-5dac82f52f45ad27f16ec2ff63ee75e2f39ef942.tar.bz2 2007-AWOR-5dac82f52f45ad27f16ec2ff63ee75e2f39ef942.zip |
Renommage pour diff de beta_old1 vers beta_accents
Diffstat (limited to 'beta_accents/fct_adm.inc.php')
-rw-r--r-- | beta_accents/fct_adm.inc.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/beta_accents/fct_adm.inc.php b/beta_accents/fct_adm.inc.php new file mode 100644 index 0000000..1b68b06 --- /dev/null +++ b/beta_accents/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 |