First of all, I assumed you would be familiar with SMF, simply because this is an SMF forum.
Secondly, I didn't specify that this was based on SMF code because it is a syntax error, not an error with the structure or a variable from SMF. So it's not directly related to SMF, it's related to the syntax.
But, I do apologize for the misunderstanding.
This reply, I feel was very rude and not very understanding or kind. And definitely a bad experience for coming to PHP Freaks.
Regarding your response.
A) I stated it was a syntax error, not an error with how SMF coded it, which is why I failed to mention this.
B) The syntax error was inside those couple lines of query, which is why I posted them.
However, the thing that bothered me most about this post was
That is quite an assumption, that isn't very nice. I knew it was in these couple lines because I made multiple tests to confirm this. It is also implying that I know nothing about how coding works, which I take as an insult.
A) Not bothering to tell someone that this is the SMF database abstraction layer and as such it is not directly a mysql question,
B) Not bothering to post the actual syntax error, because that would help someone directly help you.
C) Thinking that just because a syntax error is reported at that point in the query that it could not have actually been caused by something before that point.