prepare("SELECT pix.ID,picis,pix.views,girls.username,pix.likes,pix.comments,pix.mid FROM pix,girls WHERE girls.ID=pix.mid ORDER BY pix.ID desc LIMIT :startrow,20"); $stmt->bindValue(':startrow', $startrow,PDO::PARAM_INT); $stmt->execute(); $photolink=1; while($i3=$stmt->fetch()) { include('niceimage.php'); } ?>