The old code looks like
$stmt = mssql_init('Deletion_Request_Execute');
mssql_bind($stmt, '@Lead_ID', $lead_id, SQLVARCHAR, false);
mssql_execute($stmt,false);
mssql_free_statement($stmt);
After migration the new code looks like
$stmt = sqlsrv_prepare($mssql_db, "Deletion_Request_Execute ?", array(&$lead_id));
if (!sqlsrv_execute($stmt)) {
echo "Deletion_Request_Execute has failed!";
echo 'Errors:<pre>'; var_dump(sqlsrv_errors());
//die;
}
For some reason it doesn't work. I believe it somehow related to SQLVARCHAR I used to have in mssql_bind? I tried to strval($lead_id) still nothing... Sorry not MSSQL expert...