I have a product page which has filters like search, category, and sort by (name, price).
And my code goes like this.
if(isset($_GET['category'])){
$products = $cakeOrdering->get_data("SELECT productID, prod_name, price, image FROM products WHERE categoryID = ? ORDER BY productID DESC LIMIT...