MSSQL and DB, Zend as PHP Framework,  I am using this way to call SP with I/P Parameters and to get O/p Parameters.It seems I am writing SQL code in PHP.Any other good approaches? $str1 = DECLARE @Msgvar   varchar(100); DECLARE @last_id int;exec DispatchProduct_m_Ins $DispatchChallanId,'$FRUNo',$QTY,$Rate,$Amount,.$this->cmpId.,.$this->aspId.,.$this->usrId.,@Msg = @Msgvar OUTPUT,@LAST_ID = @last_id OUTPUT;SELECT  @Msgvar AS N'@Msg',@last_id AS '@LAST_ID'; ;//Calling SP$stmt = $db->prepare($str1);$stmt->execute();$rsDispProd = $stmt->fetchAll();$DispatchProductId   = $rsDispProd[0][@LAST_ID];//get last ins ID as O/p Parameter    
Calling MSSQL stored procedure from Zend Controller ? Any other approaches?
sql;zend framework;stored procedures;sql server