Created
August 13, 2015 02:26
-
-
Save Soulflare3/4c89069de0d621402698 to your computer and use it in GitHub Desktop.
Partial of Bot.php | DB Query
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
$db = new SQLite3('/home/ChronalRobot/handmade.db'); | |
if(!$db) | |
{ | |
echo $db->lastErrorMsg(); | |
} | |
$prerender .= "</section><table cellpadding=\"5\" class=\"heavyTable\"><thead><tr><th width=\"10%\">ID</th><th width=\"80%\">Quote</th><th width=\"10%\">Timestamp</th></tr></thead><tbody>"; | |
$results = $db->query('SELECT id, text, timestamp FROM quote'); | |
while ($row = $results->fetchArray()) | |
{ | |
$quotes++; | |
$prerender .= "<tr><td width=\"10%\">". $row['id'] . "</td><td width=\"50%\">". $row['text'] . "</td><td width=\"50%\">". date('Y-m-d', $row['timestamp']) . "</td></tr>"; | |
} | |
$prerender .= "</tbody></table><section class=\"content\">"; | |
$db->close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment