While it was kind of you to snip out irrelevant details, the obvious risk is that the problem lies in the parts you've left out - e.g. an extra quote mark or unescaped apostrophe or some such thing in the assignment to $fieldquery, or maybe some code that prepares another query and assigns that to $fieldquery (update: or rather, to $sth_fields) before your "execute" call.
For that matter, we don't actually know whether the line number reported in the error message (whatever it was) actually corresponds to the particular "execute" call you showed us.