title: Different SQL result with same query in PHP and MySQL
body: <p>After a quick search, I haven't find solution of my problem so I post a new one. </p>
  
  <p>So I have to create view in a MySQL database from a Web interface (using PHP). </p>
  
  <p>I use a PEAR framework for the connection with  MySQL(5.0.26)</p>
  
  <p>I have the SQL request : </p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE VIEW test AS SELECT cswc.code_de_la_copie, cswc.service_de_reference, cswc.libelle_de_la_copie, cswc.direction_de_securite_logique
  FROM  pressi_copiesServiceWithCibles cswc LEFT OUTER JOIN pressi_servicesReferenceWithCibles srwc ON cswc.service_de_reference = srwc.code_du_service
  WHERE cswc.cible is null
    AND (srwc.cible LIKE '%£DOMAIN£%' OR srwc.cible LIKE '%$DOMAIN$%');
  </code></pre>
  
  <p>When I execute this request directly on mon local MySQL Database, I obtain a result with 470 lines.</p>
  
  <p>However, when I execute this request in my PHP code, I have a different result (I have 386 line), and I don't know why !</p>
  
  <pre class="lang-php prettyprint-override"><code>$values['request'] = "SELECT cswc.code_de_la_copie, cswc.service_de_reference, cswc.libelle_de_la_copie, cswc.direction_de_securite_logique
  FROM  pressi_copiesServiceWithCibles cswc LEFT OUTER JOIN pressi_servicesReferenceWithCibles srwc ON cswc.service_de_reference = srwc.code_du_service
  WHERE cswc.cible is null
    AND (srwc.cible LIKE '%£DOMAIN£%' OR srwc.cible LIKE '%$DOMAIN$%');";
  
  $baseView = "test";
  
  $sqlView = 'CREATE VIEW '.$baseView.' AS '.$values['request'];
  $res =&amp; $this-&gt;mdb2-&gt;query($sqlView);
  if (PEAR::isError($res)) {
     return false;
  }
  </code></pre>
  
  <p>Moreover, I have already create 6 views before this one without any problem (same result in PHP and in MySQL)</p>
  
  <p>Thank you for your help</p>