Okay thats fine that you solved it.
Like I said hard for us to assist if you do not post the exact issue.
For future reference the actual mysql error is whats listed after the part you posted with the actual query. That way if you have any issues you can post the error for someone to assist.