Your not using any concatination. Use either...
$results = $db->prepare("SELECT category_name FROM gallery_category WHERE category_id='". $photo_category_id ."'");
or...
$results = $db->prepare("SELECT category_name FROM gallery_category WHERE category_id='$photo_category_id'");