title: SELECT query returns 0 rows in PHP and 1 row in phpMyAdmin
body: <p>I am trying to execute pretty simple query:</p>
  
  <pre><code>SELECT `id` 
  FROM `some_table` 
  WHERE `field_1`=? AND `created` &gt;= DATE_SUB(Now(), INTERVAL 1 DAY)
  </code></pre>
  
  <ul>
  <li>The 'field_1' in database table is VARCHAR(256).<br/></li>
  <li>The 'field_1' parameter is string 256 characters long and includes only [a-fA-F0-9].</li>
  </ul>
  
  <p><strong>PROBLEM</strong><br/>
  If i run this query in phpMyAdmin I get 1 row as expected.<br/>
  But if I perform this query in PHP script using mysqli prepared statements and <code>bind_param('s',...)</code> then <code>$stmt-&gt;num_rows</code> is always 0.</p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>Edit #1</strong><br/>
  Here is the PHP code:<br/></p>
  
  <pre><code>$mysqli = new mysqli($mysql_config['Host'], $mysql_config['User'], $mysql_config['Passphrase'], $mysql_config['Database']);
  if ($mysqli -&gt; connect_errno) {
      syslog(LOG_ERR, '...');
      exit;
  }
  
  if (!($stmt = $mysqli -&gt; prepare('SELECT `id` FROM `some_table` WHERE `field_1`=? AND `created` &gt;= DATE_SUB(Now(), INTERVAL 1 DAY)'))) {
      syslog(LOG_ERR, '...');
      exit;
  }
  
  if (!$stmt -&gt; bind_param('s', $string_value)) {
      syslog(LOG_ERR, '...'); 
      exit;
  }
  
  if (!$stmt -&gt; execute()) {
      exit;   
  }
  
  $stmt -&gt; bind_result($id);
  exit ('num rows is: ' . $stmt-&gt;num_rows);
  </code></pre>
  
  <p>And the output is always: num rows is: 0.   </p>
  
  <p><strong>FINALLY</strong><br/>
  After reboot the WebServer (Amazon EC2 Micro - Amazon Linux + Apache 2.4 + PHP 5.5) all things became normal. Miracle.</p>