// get data and store in a json array
$from = 0;
$to = 200;
$query = "SELECT id, motiv, nume_client, data_inreg, ora_inreg, ora_preluare, ora_rezolvare, operator_preluare, desk FROM septembrie LIMIT ?,?";
$result = $mysqli->prepare($query);
$result->bind_param('ii', $from, $to);
$result->execute();
/* bind result variables */
$result->bind_result($id, $motiv, $nume_client, $data_inreg, $ora_inreg, $ora_preluare, $ora_rezolvare, $operator_preluare, $desk);
/* fetch values */
while ($result->fetch())
{
$orders[] = array(
'id' => $id,
'motiv' => $motiv,
'nume_client' => $nume_client,
'data_inreg' => $data_inreg,
'ora_inreg' => $ora_inreg,
'ora_preluare' => $ora_preluare,
'ora_rezolvare' => $ora_rezolvare,
'operator_preluare' => $operator_preluare,
'desk' => $desk
);
}
echo json_encode($orders);
/* close statement */
$result->close();
/* close connection */
$mysqli->close();
?>
如果$to
设置为2000
,则不会显示数据库中的数据。如果我放200
,它会显示我的数据。任何人都有这方面的线索?我不能将值设置为高于200
,因为数据库中的条目将不会显示。