Here is a snapshot of my code:
$fetchPictures = $PDO->prepare(\"SELECT * FROM pictures WHERE album = :albumId ORDER BY id ASC LIMIT :s
I remember having this problem before. Cast the value to an integer before passing it to the bind function. I think this solves it.
$fetchPictures->bindValue(':skip', (int) trim($_GET['skip']), PDO::PARAM_INT);