diff --git a/adminPages/Report_Sales.php b/adminPages/Report_Sales.php index 0c208d0..aa26aea 100644 --- a/adminPages/Report_Sales.php +++ b/adminPages/Report_Sales.php @@ -17,7 +17,7 @@ require("../commonFunctions.php"); if (isset($_GET['Category'])){ //Check if category has already been set $query = "SELECT * FROM `sales by category` WHERE CategoryID = ? AND ProductName = ? "; //'?' in place of variable - $ProductName = % . $_GET['ProductName'] . %; + $ProductName = "%" . $_GET['ProductName'] . "%"; $stmt = $con->prepare($query); $stmt ->bind_param("ds", $_GET['Category'], $ProductName); //Bind category to query, category is taken in as CategoryID, so it's a digit $stmt ->execute();