Bingo on the syntax error.

I don't remember the exact query. It was when I ran the Update Thread Counters in the Admin CP that I got it. Also, like I said above. Every so often, when I click on the link to the last post title, it gives me an errorid (no thread identified error) and if I open Edit thread for that thread and click save without doing anything else, it fixes it.