For Security Concern, I am using mssql_execute().
I am not getting way to get the recordset return from procedure.

Below is my sample code

$query = mssql_init("USP_GET_ICIN_DATA",$mssql_link);
mssql_bind($query, '@ICIN_NUMBERS',trim($icin_data), SQLVARCHAR, false);
mssql_bind($query, '@FROMRECORDNUMBER', $start, SQLINT4, false);
mssql_bind($query, '@LIMIT', $limit, SQLINT4, false);

$result = mssql_execute($query);

while ($row = mssql_fetch_assoc($result)) {
           $icin =  $row["ICIN"];
           $commodity = $row["CommodityName"];
           echo $icin." " . $commodity;

Previously it was working find with mssql_query().
But for security Concern i am using mssql_execute().

Recommended Answers

All 2 Replies

mssql_execute doesn't return a result set, only out parameters or a single return value.

Thanks Pritaeas,
Then how can i get resultset and main motive is SQL Injection Prevention.
Any other option Kindly revert.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.