Created
October 1, 2011 15:10
-
-
Save lloc/1256163 to your computer and use it in GitHub Desktop.
MySQL Example 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once ("db.php"); | |
$db = new MySQL; | |
$db->sql ("SELECT * FROM Meine_Tabelle"); | |
$result = $db->result (); | |
if (!empty ($result)) { | |
echo "<table>\n"; | |
foreach ($result as $row) { | |
echo "<tr>\n"; | |
foreach ($row as $col) { | |
echo "<td>" . $col . "</td>\n"; | |
} | |
echo "</tr>\n"; | |
} | |
echo "</table>\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related post: http://lloc.de/mysql-und-php-trenn-das-mal.html