这个 SQL-Query (MyBB-Teamspeak-Sync) 的错误在哪里?
Where is the error in this SQL-Query (MyBB-Teamspeak-Sync)?
谁能告诉我以下 mysql 查询中的语法错误是什么?
select uf.ufid,u.username,u.usergroup,u.additionalgroups,uf.fid18,uf.,uf. FROM mybb_userfields as uf JOIN mybb_users as u ON uf.ufid=u.uid WHERE (uf.fid18 IS NOT NULL OR uf. IS NOT NULL OR uf. IS NOT NULL) AND (uf.fid18 != '' OR uf. != '' OR uf. != '')
错误报告:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uf. FROM mybb_userfields as uf JOIN mybb_users as u ON uf.ufid=u.uid WHERE (uf.f' at line 1
提前致谢
您有多个 "uf." 实例会导致问题。
正如 Aynber 提到的,您有这两个实例,但在 sql 代码中还有其他实例。将字段名称与那些 table 别名相关联后,您应该会看到更好的结果。
祝你好运!
谁能告诉我以下 mysql 查询中的语法错误是什么?
select uf.ufid,u.username,u.usergroup,u.additionalgroups,uf.fid18,uf.,uf. FROM mybb_userfields as uf JOIN mybb_users as u ON uf.ufid=u.uid WHERE (uf.fid18 IS NOT NULL OR uf. IS NOT NULL OR uf. IS NOT NULL) AND (uf.fid18 != '' OR uf. != '' OR uf. != '')
错误报告:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uf. FROM mybb_userfields as uf JOIN mybb_users as u ON uf.ufid=u.uid WHERE (uf.f' at line 1
提前致谢
您有多个 "uf." 实例会导致问题。 正如 Aynber 提到的,您有这两个实例,但在 sql 代码中还有其他实例。将字段名称与那些 table 别名相关联后,您应该会看到更好的结果。 祝你好运!