summaryrefslogtreecommitdiff
path: root/www-ssl/inc/funktion_db_list.php
diff options
context:
space:
mode:
Diffstat (limited to 'www-ssl/inc/funktion_db_list.php')
-rwxr-xr-xwww-ssl/inc/funktion_db_list.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/www-ssl/inc/funktion_db_list.php b/www-ssl/inc/funktion_db_list.php
new file mode 100755
index 00000000..894de5e5
--- /dev/null
+++ b/www-ssl/inc/funktion_db_list.php
@@ -0,0 +1,34 @@
+<?PHP
+
+function funktion_db_list($Table_Name) {
+
+include ("./inc/db.php");
+
+$SQL = "SELECT * FROM `".$Table_Name."`";
+$Erg = mysql_query($SQL, $con);
+
+// anzahl zeilen
+$Zeilen = mysql_num_rows($Erg);
+
+$Anzahl_Felder = mysql_num_fields($Erg);
+
+echo "<table border=1>";
+
+echo "<tr>";
+for ($m = 0 ; $m < $Anzahl_Felder ; $m++) {
+ echo "<th>". mysql_field_name($Erg, $m). "</th>";
+ }
+echo "</tr>";
+
+for ($n = 0 ; $n < $Zeilen ; $n++) {
+ echo "<tr>";
+ for ($m = 0 ; $m < $Anzahl_Felder ; $m++) {
+ echo "<td>".mysql_result($Erg, $n, $m). "</td>";
+ }
+ echo "</tr>";
+}
+
+echo "</table>";
+}
+
+?>