title: Query works in phpmyadmin but not in PHP script
body: <p>I found similar questions but can't solve my problem yet. Here is the relevant code:</p>
  
  <pre><code>$query = "SELECT * FROM conceptos WHERE descripcion = '$descripcion'";
  if ($result = mysql_query($query,$connection)){
      if (mysql_num_rows($result) &gt; 0){
          //Do something
      } else {
          die($query);
          exit;
      }
  } else {
      die(mysql_errno() . ' - ' . mysql_error());
      exit;
  }
  </code></pre>
  
  <p>I don't have problems with the connection or the permissions, because this code snippet is inside a loop and the other queries enter the "Do something" section. But when I take the echoed query and execute it in phpMyAdmin, it returns 1 value as expected. Why? What reasons can lead to this behavior? Thanks in advance for any advice.</p>