Home >Backend Development >PHP Tutorial >How to call MSSQL stored procedure in PHP_PHP tutorial
//Execute stored procedure
for($i=0;$i<$ses_basket_items;$i++)
{
$query="exec add_ddxx
@p_account="$session_account",
@p_name="$name[$i]",
@p_num="$num[$i]",
@p_marketprice="$marketprice[$i]",
@p_memberprice=" $memberprice[$i]",
@p_priceoftax="$notaxprice[$i]",
@p_priceoflast="$lastprice[$i]",
@p_sumprice="$price[$i ]",
@p_buy_date="$date",
@p_flag="$p_flag"";
$result=mssql_query($query,$connection) or die("Stored procedure execution error, unable to Execute the SQL: $query");
}