我想选择与登录的acc_id相同的acc_id的位置
I {//WHERE account_info.acc_id='%s'
虽然但我没有办法解决这个问题
当我添加它时,不会返回任何内容。
当我执行没有它的代码时,所有数据不仅返回具有相同acc_id
的数据$postdata = file_get_contents("php://input");
if (isset($postdata)) {
$request = json_decode($postdata);
$User_ID = $request->acccid;
$sql = sprintf("SELECT * FROM account_info
join todolist on account_info.acc_id = todolist.acc_id
//WHERE account_info.acc_id='%s'
",
mysqli_real_escape_string($conn,$User_ID));
$result=$conn->query($sql);
if ($result->num_rows>0)
{
while($row=$result->fetch_assoc())
{$data[]=$row;
}
echo json_encode($data);
}
}