[eluser]jleequeen[/eluser]
I actually have figured out the problem now, but thanks for your reply. I had a uncommented extra call which tried to run the query twice and gave the unexpected error. It was just confusing since the code is nowhere near line 1 and the part of the code I was looking at was all correct.