Answer the question
In order to leave comments, you need to log in
How to get return value from procedure in CodeIgniter?
There is a procedure that returns a number when executed.
In CI I'm trying to get the value like this:
$str ="DECLARE @ret int ".
"exec @ret = [my_proc] ".
"@UserID = '".$this->getID()."', ".
"SELECT 'val' = @ret";
$result = $this->db->query($str);
return $result->result('val');
Answer the question
In order to leave comments, you need to log in
look at the row method
call it like this $result->row('val')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question