Edit: Fixed
$statement = $conn->prepare("SELECT id,username FROM public2 WHERE username = :name LIMIT :limit OFFSET :offset");
$name = "Lei Lei";
$statement->bindValue(':name', $name);
$statement->bindValue(':limit', (int) $start, PDO::PARAM_INT);
$statement->bindValue(':offset', (int) $per_page, PDO::PARAM_INT);
$statement->execute();