title: Why is this SQL SELECT statement not retrieving the row I just inserted?
body: <p>I am creating an in-memory SQLite database and inserting some a row into it. Unfortunately, I am unable to select the row I just inserted.</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  const CACHE_SCHEMA = &lt;&lt;&lt;EOD
  
  CREATE TABLE test ( column1 TINYTEXT,
                      column2 MEDIUMTEXT,
                      column3 INT,
                      column4 INT )
  
  EOD;
  
  $db = new PDO('sqlite::memory:');
  
  $statement = $db-&gt;query(CACHE_SCHEMA);
  $statement-&gt;execute();
  
  $statement = $db-&gt;prepare('INSERT INTO test (column1, column2, column3, column4) VALUES (?,?,?,?)');
  $statement-&gt;execute(array('a', 'b', 123, 2));
  
  $statement = $db-&gt;prepare('SELECT column2 FROM test WHERE column1 = ? AND column3 + column4 &gt;= ?');
  $statement-&gt;execute(array('a', 124));
  
  var_dump($statement-&gt;fetch(PDO::FETCH_ASSOC));
  
  ?&gt;
  </code></pre>
  
  <blockquote>
    <p><strong>Output:</strong> <code>bool(false)</code></p>
  </blockquote>
  
  <p>As you can see, the <code>'SELECT'</code> statement is not returning the row I inserted:</p>
  
  <ul>
  <li>Adding <code>'column3'</code> and <code>'column4'</code> of the row I inserted yields <code>125</code>.</li>
  <li><p>The <code>'WHERE'</code> clause of the statement becomes:</p>
  
  <blockquote>
    <p><code>'WHERE column1 = "a" AND column3 + column4 &gt;= 124'</code></p>
  </blockquote>
  
  <p>once parameters are filled in.</p></li>
  <li>Unless I'm mistaken, <code>125 &gt;= 124</code>.</li>
  </ul>