cannot use a variable when using the sql command LIMIT