CodeIgniter Forums
get output from Stored Procedure - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: get output from Stored Procedure (/showthread.php?tid=67536)



get output from Stored Procedure - mhdghavam - 03-06-2017

Hello How are you
I want to get a value as output from Stored Procedure in Microsoft SQL Server but I can't

my Stored Procedure code:

Code:
ALTER PROCEDURE [dbo].[count_message]
        @username smallint
    
    
AS    SET NOCOUNT ON;

     
 

return  isnull((select count(*) from dbo.sd_message where ms_user=1 or [email protected]),0)


my PHP/Codeingiter Code:

PHP Code:
$result $this->db->query("update_message '2300'");
echo 
'resutl:'.$result