此SQL查询中的错误在哪里(MyBB-Teamspeak-Sync)?

时间:2017-06-15 19:24:08

标签: php mysql mybb

有人能告诉我以下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

提前致谢

1 个答案:

答案 0 :(得分:0)

你有几个" uf。"这会导致问题。 正如Aynber所提到的,你有这两个实例,但是你在sql代码中还有其他实例。将字段名称与那些表别名关联后,您应该会看到更好的结果。 祝你好运!