title: Represent query from Stored Procedure that return multiple Tables in PHP?
body: <p>I have used below stored procedure.</p>
  
  <pre><code> DELIMITER $$
  
   CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllUser`()
   BEGIN
  
   Select userId, userName, userEmail, userFirstName, userLastName from usertbl order by userId ASC;
  
   Select count(*) as total from usertbl ;
  
   END
  </code></pre>
  
  <p>I know how to execute this procedure. For this purpose I have used below function that return result. but how to differentiate and print two tables(one is user table and other represent total) return from stored procedure.</p>
  
  <pre><code>function GetAllUser() {
      $query = "CALL GetAllUser()";
      if ($query_run = mysql_query($query)) {
        $query_num_rows = mysql_num_rows($query_run);
        return $query_run;
      }
      else {
        return '0';
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Sorry, for Bad English.</p>