title: SQL Server bind parameters
body: <p>I have some code which I can't find the problem in, I can't bind parameters:</p>
  
  <pre><code>$id =1;
  $pass =0x3A;
  $stmt = $con-&gt;prepare("SELECT [UID]
        ,[ID]
        ,[PWD]
    FROM [kal_auth].[dbo].[Login] WHERE [ID] =? AND [PWD]=?");
  $stmt-&gt;execute(array($id,$pass));
  $stmt-&gt;fetchAll();
  $count = $stmt-&gt;rowCount();
  echo $count;
  </code></pre>
  
  <p>this code found COUNT 0 </p>
  
  <pre><code>$stmt = $con-&gt;prepare("SELECT [UID]
        ,[ID]
        ,[PWD]
    FROM [kal_auth].[dbo].[Login] WHERE [ID] =1 AND [PWD]=0x3A");
  $stmt-&gt;execute();
  $stmt-&gt;fetchAll();
  $count = $stmt-&gt;rowCount();
  echo $count;
  </code></pre>
  
  <p>and this code work and find 1 row.</p>
  
  <p>I have also tried <code>PDOStatement::bindParam</code> and <code>PDOStatement::bindValue</code> they don't work both, I really can't find where my mistake is ....</p>
  
  <p>My query worked in SQL Server as you can see in the following screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/qNYik.png"></p>