new way to generate database fromseparate schema.sql
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user