0
出于某种原因,使用Laravel ST_Intersects给出了错误:PostGIS的与Laravel
Undefined function: 7 ERROR: function st_intersects(public.geometry, public.geometry) does not exist
完全一样的查询,同DB是工作在纯PHP完美的罚款。
完整的查询文本:
$query =
"SELECT estado, municipio, COUNT(*)
FROM public.focos_bdq, dados_geo.poligonos_deter
WHERE ST_Intersects(focos_bdq.geometria, poligonos_deter.geom)
AND bioma LIKE '$bioma_bd'
AND date_trunc('month', data_hora_gmt)::date = '$mes_anterior'
AND (satelite LIKE 'AQUA%' OR satelite LIKE 'TERRA%')
GROUP BY municipio, estado
ORDER BY COUNT(*) DESC";
$focos = \DB::select($query);
不幸的是附加的模式并没有帮助。我如何验证用户laravel? –
我只是指laravel用来登录数据库的数据库用户,它将在数据库配置文件中。此外,你可以通过打开PG日志记录或使用laravel记录器来记录sql,并捕获发送给D B? –