From 48967d0645203884cea9edbba55415b4dfe33b5b Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Mon, 31 Oct 2016 12:47:48 +0800 Subject: [PATCH] Fix multiple appearances when ids are off --- get.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get.php b/get.php index 7aadf33..c443f5f 100644 --- a/get.php +++ b/get.php @@ -10,7 +10,7 @@ $result=mysqli_query($db, $qry); $newlastid=$_GET["lastid"]; $jspo=array(); while ($row = mysqli_fetch_array($result)) { -$newlastid=$newlastid+1; +$newlastid=$row["id"]; array_push($jspo, array("txt"=>stripslashes($row["txt"]), "tim"=>$row["tim"], "id"=>$row["id"])); } echo json_encode(array("posts"=>$jspo, "lastid"=>$newlastid));