phpmysqlmybb

Where is the error in this SQL-Query (MyBB-Teamspeak-Sync)?


Can anybody tell me whats the syntax error in the following mysql query ?

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. != '')

Error-Report :

#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

Thanks in advance


Solution

  • you have several instances of "uf." that would cause a problem. As Aynber mentioned, you have those two instances, but you have additional instances further in the sql code. Once you associate field name with those table aliases, then you should see better results. Good luck!