有人可以帮助我,我该怎么办?请帮忙。将php查询返回给json null为什么?
$resultG = mysqli_query($db,"select * from Rubrica where ID_Dispositivo = '$UserID' ");
$response = array();
while($row = mysqli_fetch_assoc($resultG)){
$response[] = $row;
}
echo json_encode($response);
的响应是d/doInBackground(RESP):[]
为什么是空????
您是否尝试print_r($ row); –
直接在数据库上尝试查询。除了你之外,没有人可以知道是否有与你的查询匹配的数据... –
为什么要排?,我需要将其编码为json –