trollolodn

#php #mysqli [Issue] Call stored with in/out parameters;

Feb 4th, 2013
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. //Call stored with in/out parameters;
  2. public function executeParams2($prcName, $arrParams, $outParams = null, $isOutVar = false){
  3.         $res1;$res2;
  4.         /*
  5.         CALL prc_UserAccount_CheckUserExist('[email protected]',1,@kq,@kq1);
  6.         SELECT @kq;
  7.         */
  8.         $stmt = $this->db->prepare("call $prcName (?,?,?)");
  9.         if (!$stmt)
  10.         {
  11.             echo $this->db->error;
  12.         }
  13.         $stmt->bind_param('sii', $arrParams[0], $arrParams[1], $res1);
  14.        
  15.         $stmt->execute();
  16.         $result = $stmt->bind_result($res1);
  17.         $aaa = $stmt->fetch();
  18.         var_dump($res1);
  19.        
  20.    
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment