【发布时间】:2011-11-11 21:51:48
【问题描述】:
我正在使用 PHP。这是我的查询:
$sql = "SELECT *
from place as s
where checkDistance($lati1,$longi1,s.lat,s.lon)<$dist";
此地点表包含三个字段:placeId、PlaceName 和 Address。现在我想计算 placeId 的评分,这是上述查询的结果。为了计算评分,我有另一个表 rating,其中有两个字段:placeId 和 noOfPerson。
评分将由每个 placeId 的 (noOfPerson/maximum_no_of_person) 计算。我该如何实现?
【问题讨论】: