title: PDO execution in php wont return any row but there are some if I execute the same query in the database
body: <p>I have a really annoying problem, I have thins interface that creates a query and execute it in the database via PDO. Most of the time it will work just fine but sometimes the query will return 0 rows while executed via the PDO, nonetheless if I execute the very same query directly in the database (MySQL) I'll get some results.</p>
  
  <p>My Code:</p>
  
  <pre><code>        $connect = $this-&gt;get('db');
          $q = $connect-&gt;prepare($chain1);
          $q-&gt;execute();
          $query = $q-&gt;fetchAll(\PDO::FETCH_ASSOC);
  </code></pre>
  
  <p>In the chain I have concatenated the query and the same query is stored in a separate file, when I get that query and execute it in the database I get rows. Whereas in the code I've wrote I get none.</p>
  
  <p>I've already tried changing the PDO code for fetching the rows and looking in PDO manuals to find some insights but I can't find any, please help as I'm starting to drive mad.. lol.</p>
  
  <p>I'm using Ubuntu Linux 14.04 (server and client same behavior).
  Versions:<br>
      php5   5.5.9+dfsg-1ubuntu4.6
      php5-mysql  5.5.9+dfsg-1ubuntu4.6
      php5-odbc   5.5.9+dfsg-1ubuntu4.6</p>
  
  <p>many thanks for any idea you could give me.</p>