title: Executing a Stored Procedure with pdo_sqlsrv
body: <p>I'm trying to figure out how do execute a stored procedure with php5.3/pdo_sqlsrv on sql server 2008.</p>
  
  <p>I've found this code:</p>
  
  <pre><code>$sql = new PDO( "sqlsrv:server=$server;Database = $database", $user, $password);
  $query = "{? = CALL sp_Login(?, ?)}"; 
  $stmt = $sql-&gt;prepare( $query ); 
  $returnVariable = 0;
  $inputVariable1 = 'input1';
  $inputVariable2 = 'input2';
  $stmt-&gt;bindParam(1,$returnVariable,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,100);
  $stmt-&gt;bindParam(2,$inputVariable1,PDO::PARAM_STR);
  $stmt-&gt;bindParam(3,$inputVariable2,PDO::PARAM_STR);
  $stmt-&gt;execute();
  echo "Return value: ".$returnVariable;
  </code></pre>
  
  <p>the stored procedure has two input and one output paramter, but it seems it returns nothing, return value is still 0..</p>
  
  <p>I can run select/insert queries, so it's not the connection.</p>
  
  <p>Is there any good documentation about stored procedures with pdo_sqlsrv?</p>
  
  <p>thanks!</p>