我正在尝试选择距离资产10公里范围内的所有住宅的ID。
不幸的是我收到了这样的错误:
Symfony \ Component \ Debug \ Exception \ FatalErrorException syntax error, unexpected '?> ', expecting function (T_FUNCTION)
码
public function postAnalysis(){
$relevant_home = Input::get('relevant_homes');
$asset = Home::where('Home_name', '=' , $relevant_home)->first();
echo $asset->Eastings;
echo $asset->Northings;
$competitors = Home::select('SELECT SQRT(POW($Eastings - `Eastings`,2) + POW($Northings - `Northings`,2)) as distance FROM homes HAVING distance <=10 ORDER BY distance ASC', array('competitors'))->get();
echo $competitors;
}
请解决我的问题。