prepare($query); $statement->bindValue(":category_id", $category_id); $statement->execute(); $products = $statement->fetchAll(); $statement->closeCursor(); return $products; } ?>