Here is a snapshot of my code:
$fetchPictures = $PDO->prepare(\"SELECT *
FROM pictures
WHERE album = :albumId
ORDER BY id ASC
LIMIT :s
for LIMIT :init, :end
You need to bind that way. if you had something like $req->execute(Array());
it wont work as it will cast PDO::PARAM_STR
to all vars in the array and for the LIMIT
you absolutely need an Integer.
bindValue or BindParam as you want.
$fetchPictures->bindValue(':albumId', (int)$_GET['albumid'], PDO::PARAM_INT);