title: ODBC prepared statements in PHP
body: <p>I'm trying to use odbc_prepare and odbc_execute in PHP as follows:</p>
  
  <pre><code>$pstmt=odbc_prepare($odb_con,"select * from configured where param_name='?'");
  $res=odbc_execute($pstmt,array('version'));
  var_dump($res);  //bool(true)
  $row = odbc_fetch_array($pstmt);
  var_dump($row);  //bool(false)
  </code></pre>
  
  <p>The first var_dump returns true so the execute succeeds, but there is no row returned.  A row does indeed exist with the param_name = 'version'.  Why is no row returned?</p>
  
  <p>To make things interesting, I ran another very simple example in php using a prepared insert.</p>
  
  <pre><code>$pstmt=odbc_prepare($odb_con,"insert into tmp1 values(?,'?')");
  </code></pre>
  
  <p>This line, by itself, inserted a row into the database!!  Surely this is just wrong?  The data entered was col 1 = blank, col 2 = ?</p>
  
  <p>Any advice on where to start fixing this would be appreciated, thanks.</p>
  
  <p>Edit:  This is in PHP 5.2.8</p>