title: Executing SQL Stored Procedures with Input and Output parameters
body: <p>I am very new to stored procedures and the PDO library so please take it easy on me. I am trying to execute a stored procedure using a PDO function and retrieve the recordsets along with the output parameters. Which function should I use and what parameters are necessary?</p>
  
  <p>If I want to execute basic statements using the function like the following example, what PDO method should I use? e.g.</p>
  
  <pre><code>$mssql = new mssql;
  
  $mssql-&gt;sql('stored_procedure()');
  $mssql-&gt;sql('SELECT * FROM [test]');
  </code></pre>
  
  <p><strong>I want the function to return the correct results dependant on the statement type. Is this going to be possible?</strong></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Just in case I didnt make it very clear, the 'mssql' class uses the PDO class to execute queries. At the moment I am using:</p>
  
  <pre><code>$PDO-&gt;prepare();
  $PDO-&gt;exec();
  </code></pre>