For LIMIT to work we need to be able to pass bound parameter types to query->execute(): MySQL requires that offset/limit parameters be integers.