$GeneralSearch = ”;
$DepartmentID = 0;
$CategoryID = 0;
$Brands = ”;
$Instock = 0;
$PriceLevel = 0;
$MinPrice = 0;
$MaxPrice = 500;
$Sort = 0;

$db = DB::connection()->getPdo();
$stmt = $db->prepare(“EXEC [dbo].[SP_Web_Search] ?,?,?,?,?,?,?,?,?”);
$stmt->bindParam(1, $GeneralSearch);
$stmt->bindParam(2, $DepartmentID);
$stmt->bindParam(3, $CategoryID);
$stmt->bindParam(4, $Brands);
$stmt->bindParam(5, $Instock);
$stmt->bindParam(6, $PriceLevel);
$stmt->bindParam(7, $MinPrice);
$stmt->bindParam(8, $MaxPrice);
$stmt->bindParam(9, $Sort);
$stmt->execute();
$result = $stmt->fetchAll();

Advertisements