Skip to content

Instantly share code, notes, and snippets.

@lloc
Created October 1, 2011 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloc/1256163 to your computer and use it in GitHub Desktop.
Save lloc/1256163 to your computer and use it in GitHub Desktop.
MySQL Example 3
<?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";
}
?>
@lloc
Copy link
Author

lloc commented Oct 1, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment