diff options
author | Angelo Cuccato <cuccato@web.de> | 2010-11-08 23:38:31 +0100 |
---|---|---|
committer | Angelo Cuccato <cuccato@web.de> | 2010-11-08 23:38:31 +0100 |
commit | 0059fd16dd903abc5417e3f4c8c6a9c1fdb3ab26 (patch) | |
tree | 9a0665d2ca5db41678f2624f8ea108a1141bd2ce /includes | |
parent | 4cd60813539039dbedff97f4359a5094b0286dd8 (diff) |
add Statistics
Diffstat (limited to 'includes')
-rwxr-xr-x | includes/funktion_db_list.php | 72 |
1 files changed, 52 insertions, 20 deletions
diff --git a/includes/funktion_db_list.php b/includes/funktion_db_list.php index fbf1c821..8b64297e 100755 --- a/includes/funktion_db_list.php +++ b/includes/funktion_db_list.php @@ -1,34 +1,66 @@ <?PHP -function funktion_db_list($Table_Name) { - +function funktion_db_list($Table_Name) +{ global $con; -$SQL = "SELECT * FROM `".$Table_Name."`"; -$Erg = mysql_query($SQL, $con); + $SQL = "SELECT * FROM `".$Table_Name."`"; + $Erg = mysql_query($SQL, $con); -// anzahl zeilen -$Zeilen = mysql_num_rows($Erg); + // anzahl zeilen + $Zeilen = mysql_num_rows($Erg); -$Anzahl_Felder = mysql_num_fields($Erg); + $Anzahl_Felder = mysql_num_fields($Erg); -echo "<table border=1>"; + echo "<table border=1>"; -echo "<tr>"; -for ($m = 0 ; $m < $Anzahl_Felder ; $m++) { - echo "<th>". mysql_field_name($Erg, $m). "</th>"; - } -echo "</tr>"; + 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>"; + 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>"; } -echo "</table>"; +function funktion_db_element_list_2row( $TopicName, $SQL) +{ + global $con; + + echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; + echo "<caption>$TopicName</caption>"; +# echo "\t<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n"; + + $Erg = mysql_query($SQL, $con); + echo mysql_error($con); + + echo "<tr class=\"contenttopic\">"; + for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) + { + echo "<th>". mysql_field_name($Erg, $m). "</th>"; + } + echo "</tr>"; + + for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++) + { + echo "<tr class=\"content\">"; + for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) + { + echo "<td>".mysql_result($Erg, $n, $m). "</td>"; + } + echo "</tr>"; + } + echo "</table>\n"; } ?> |