0
地域のポイントと私のポイントとの間の最小距離を見つけたいと思います。私はそれについて検索しST_CONTAINを見つけ、私はこの機能を使用する場合しかし、私はエラーを取得する:ここでLaravel + Doctrine - ST_DISTANCEで最も近い場所を取得
Expected known function, got 'ST_Distance'
は私のコードです:
public function getNearestPlace(Point $point)
{
$neighborhoods = $this->_em
->createQueryBuilder()
->select('Region')
->from($this->entityClass, 'Region')
->where(
'
MIN (ST_Distance(
Region.regionMapCenter,
GeomFromText(\'POINT(' . $point . ')\')
) > 0
'
)
->getQuery()
->execute();
return $neighborhoods;
}
それを解決する方法は?