prepare("SELECT * FROM catalog WHERE id = :id"); $q->bindParam(':id',$id,PDO::PARAM_INT); $q->execute(); $item = $q->fetch(); if(!$item) { die("go fuck yourself (can't find item)"); // todo: redirect to 404 } ?>
thats all i have to say