Without knowing what the SQL statement is, we can;t help you - and we can;t see what
So start with the debugger (PHP: Debugging in PHP - Manual
]) and find out exactly what the command string is.
Then look closely at that - the error message seems to say that there is a decimal point immediately before the keyword
that shouldn't be there.