首先,如果你在这个平台上寻求帮助,下一次尝试更像一个问题。
其次,在查询中直接集成变量从来不是一个好主意。这将使您的查询容易被SQL注入。基本信息可以找到
here
.
通过查看您的查询(在错误中),我们可以看到使用
*
通配符。
select
*
from
users
where
exists (
select
*,
*, <-- This will throw a syntax error.
(6371 * acos(co ... the rest of the distance calculation