【发布时间】:2016-07-25 09:55:40
【问题描述】:
有人可以帮我吗,我该怎么办?请帮忙。
$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): []
为什么是空???
【问题讨论】:
-
你是否尝试打印_r($row);
-
直接在数据库上尝试查询。除了您之外,没有人可以知道是否有与您的查询匹配的数据...
-
为什么行?,我需要编码为 json
-
它提供数据但不返回
标签: java php android arrays json