det här måste fungera, eftersom jag använder det :
$str = "DECLARE @Msgvar varchar(100);DECLARE @last_id int;
exec CallEntry_Ins $CallLoginId,".$this->usrId .",@Msg = @Msgvar OUTPUT,@LAST_ID = @last_id OUTPUT;
SELECT @Msgvar AS N'@Msg',@last_id AS '@LAST_ID'; ";
$stmt = $db->prepare($str);
$stmt->execute();
$rtStatus = $stmt->fetchAll();
$rtStatus[0]["@LAST_ID"] //accessing Op para