Created
April 18, 2012 05:38
-
-
Save RSquaredSoftware/2411307 to your computer and use it in GitHub Desktop.
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
foreach ($games as $game) { | |
try{ | |
$dbh->exec("USE $dbName;"); | |
$sth = $dbh->prepare("SELECT * FROM $game ORDER BY date $sort"); | |
$sth->execute(); | |
$result[$game] = $sth->fetchAll(PDO::FETCH_ASSOC); | |
} | |
catch (PDOException $e) { | |
die("Printing Data Error: ". $e->getMessage()); | |
} | |
} | |
echo "<table><tr><th><a name=date href='?date=".$datesort."'>Date</a></th>"; | |
foreach ($result as $game => $results) { | |
echo "<th><a name=$game>$game</a><tr>\n"; | |
foreach ($results as $temp) { | |
foreach ($temp as $key => $value) { | |
echo "<td>"; | |
echo $value; | |
echo "</td>"; | |
} | |
echo "</tr>"; | |
} | |
echo "</th>"; | |
} | |
echo "</table>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment