title: MySQL query giving division by zero error
body: <p>I have this sql query</p>
  
  <pre><code>$sql =  'SELECT id, texto FROM `db_name`.`table_name` WHERE ( CONVERT( `texto` USING utf8 ) LIKE '%q%' ) ORDER BY score DESC LIMIT 0,15';
  </code></pre>
  
  <p>I am getting following error </p>
  
  <pre><code>Warning division by zero at line 40 
  
  Query was empty
  </code></pre>
  
  <p>Although when I copy the same query to my phpmyadmin terminal for sql and do query there it gives result </p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>function get()
          {
              $sql =  'SELECT id, texto FROM `db_name`.`table_name` WHERE ( CONVERT( `texto` USING utf8 ) LIKE '%fincas%' ) ORDER BY score DESC LIMIT 0,15';
  
  
              $rc= $this-&gt;parent-&gt;parent-&gt;database-&gt;query($sql);
  
              $post='';
              while($row= $this-&gt;parent-&gt;parent-&gt;database-&gt;readRows($rc))
              {
                  echo $post;
                  echo str_replace('"','&amp;quot;',$row['texto']).'"'.$row['id'];
                  $post="\n";
              }
  
          }
  </code></pre>