我在php工作。这是我的代码:=
$sql = "SELECT *,star(round((((f.c_count_girls+f.c_count_boys)/f.total_capacity)*100)/$maxiValue)) as rank
from place as f
where placeId in (
select placeId
from place as s
where checkDistance($lati1,$longi1,s.lat,s.lon)<$dist
)";
$result = mysql_query($sql) or die ("Query error: " . mysql_error());
然后这会产生这个错误: -
mysql_query()[function.mysql-query]:无法保存结果集
但有时它会产生正确的答案,所以请告诉我这个问题的原因是什么?