new way to generate database fromseparate schema.sql

This commit is contained in:
Marc Wäckerlin
2015-11-09 11:13:34 +00:00
parent bd02ae565c
commit 4f8d997805
20 changed files with 314 additions and 125 deletions

View File

@@ -28,11 +28,12 @@
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
require_once("messagetable.php");
try {
require_once("opendb.php");
$start = $db->real_escape_string($_REQUEST['start']);
$q = $db->query("select id, UNIX_TIMESTAMP(time) as time, user, msg from message where id>$start;");
echo json_encode($q->fetch_all(MYSQLI_ASSOC));
if ($q) echo json_encode($q->fetch_all(MYSQLI_ASSOC));
else echo json_encode(null);
} catch (Exception $e) {
echo json_encode(null);
}