Accesss Store Procedure

$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
This entry was posted in Laravel. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s