Fixed type error in sql statement

Field userid is of numeric type, therefore submitting the id as string leads to errors under certain circumstances.