title: Problem in retrieving the out parameter of a mysql stored procedure through php script
body: <p>Hi I have a simple MYSQL stored procedure which has an IN (int) and an OUT (int) parameters.
  I am calling the stored procedure from a PHP script. </p>
  
  <p>Stored Procedure code:</p>
  
  <pre><code>  DELIMITER $$
    USE `testing`$$
  
    DROP PROCEDURE IF EXISTS `test_sp_inout_params`$$
  
    CREATE DEFINER=`root`@`localhost` PROCEDURE `test_sp_inout_params`(IN username VARCHAR(30), OUT user_id INT)
    BEGIN
     INSERT INTO users (`name`) VALUES (username);
     SET user_id = LAST_INSERT_ID();
    END$$
  
   DELIMITER ;
  </code></pre>
  
  <p>I am able to run the stored procedure from mysql query window with:</p>
  
  <pre><code> CALL test_sp_inout_params('TestName', @user_id);
   SELECT @user_id
  </code></pre>
  
  <p>But from PHP script I am geting errors.. :(</p>
  
  <pre><code>    mysqli_query($conn, "CALL test_sp_inout_params('surya', @user_id)");
      $rs = mysqli_query($conn, "SELECT @user_id");
      $row = mysqli_fetch_assoc($rs);
      var_dump($row);
  </code></pre>
  
  <p>[EDITED]
  The above PHP script executed perfectly, when it is running individually.
  But I have another stored procedure.. and when I am calling that before the above php-script, I am geting that sort of warning message.
  So, the script I am using is (before the above mentioned php script):</p>
  
  <pre><code>    $rs1 = mysqli_query($conn, "CALL test_sp_no_params()");
      $arr = array();
      while($row1 = mysqli_fetch_assoc($rs1))
          $arr[] = $row1;
  </code></pre>
  
  <p>What is the problem when I am calling the second stored procedure?</p>
  
  <p>Can anyone help me out please!</p>
  
  <p>Thanks in advance,
  SuryaPavan</p>