title: How to create a stored procedure in mysql
body: <p>I have created the following stored procedure in mysql...</p>
  
  <pre><code>DELIMITER //
  CREATE PROCEDURE GetMember(IN in_memberID int)
  BEGIN
      SELECT *
      FROM Members
      WHERE MemberID = in_memberID;
  END//
  
  
  
  $result = mysql_query("CALL GetMember(".$memberID.")") or die(mysql_error());
  while ($row = mysql_fetch_array($result)) {
      echo $row['Name'] . "&lt;/br&gt;";
  }
  </code></pre>
  
  <p>But when I call it from php it returns all records in the Members table, what am I doing wrong?</p>
  
  <p>EDIT:
  When I try to call the query within phpmyadmin I get this error</p>
  
  <pre><code>CALL GetMember(1);
  
  #1312 - PROCEDURE myDb.GetMember can't return a result set in the given context
  </code></pre>