Posted by Aashis on May 13th, 2011 at 1:45 pm
How we can create a dynamic/generic sq insert statement. Example below shows how we execute stored procedure using micorsoft sqlsrv library.
/*==============================================
* Executes stored procedure
* @params: stored procedure name, variables=data array
===============================================*/
public function executeProc($conn,$sp_name,$paramArray) {
try {
$sp_stmt = "EXEC " . $sp_name . " ";
$paramString = "";
$stmt = sqlsrv_prepare( $conn, $sp_stmt, arr...
Read More