$latN = $_POST["latN"];
$latS = $_POST["latS"];
$longE = $_POST["longE"];
$longW = $_POST["longW"];
$statement = mysqli_prepare($con, "SELECT * FROM find WHERE lat <= latN AND lat >= latS
AND lng >= longW AND lng <= longE");
mysqli_stmt_bind_param($statement, "ss", $lat, $long);
mysqli_stmt_execute($statement);
mysqli_stmt_store_result($statement);
mysqli_stmt_bind_result($statement, $lat, $long);
$response = array();
$response["success"] = false;
while(mysqli_stmt_fetch($statement)){
$response["success"] = true;
$response["lat"] = $lat;
$response["long"] = $long;
}
print_r(json_encode($response));
我通过android以字符串的形式将latN,latS,longE,longW发布到此页面,我试图找出我所拥有的值范围内是否有任何坐标给出。我很难过,无法解决为什么这一切都是假的。有什么想法吗?