prepare($query); $statement->bindValue(":category_id", $category_id); $statement->execute(); $products = $statement->fetchAll(); $statement->closeCursor(); return $products; } /*********************************************** * step 3 * delete_product($product_id) ***********************************************/ function delete_product($product_id) { global $db; $query = 'DELETE FROM products WHERE productID = :product_id'; $statement = $db->prepare($query); $statement->bindValue(':product_id', $product_id); $statement->execute(); $statement->closeCursor(); } ?>