Code that returns a result set that contains one row
<?php
$query = 'SELECT * FROM categories
WHERE categoryID = :category_id';
$statement = $db->prepare($query);
$statement->bindValue(':category_id', $category_id);
$statement->execute();
$category = $statement->fetch();
$statement->closeCursor();