title: Division by zero, "Query was empty" error in MySQL
body: <p>I try to make a search engine for profiles, but I stock with an error that "Division by zero" and and after I used var_dump(mysql_error()) it shows me "Query was Empty".</p>
  
  <p>here is my query and php code:</p>
  
  <pre><code>$search_rs = dbq('SELECT * FROM users WHERE fname LIKE '%$_GET[query]%' LIMIT 0, OR fname LIKE '%$_GET[query]%'');
              if($search_rs == false) {
                      var_dump(mysql_error());
                  }
           elseif (db_num($search_rs) &gt; 0) {
  
                  while ($results = db_next($search_rs)) {
  
                  echo('&lt;li&gt;
                              &lt;a class="avatar" href="http://mysite/'.$results['pagekey'].'" target="_blank"&gt;
                                  &lt;img src="'.thumbnail($results['avatar'], 64, 64).'" /&gt;
                              &lt;/a&gt;
                              &lt;div class="info"&gt;
                                  &lt;a href="http://profiler.ir/'.$results['pagekey'].'" target="_blank"&gt;
                                      &lt;span class="fullname"&gt;'.$results['pre_name'].' '.$results['fname'].' '.$results['lname'].'&lt;/span&gt;
                                  &lt;/a&gt; 
                              &lt;/div&gt;
                        &lt;/li&gt;  ');
       }
  }
  else echo "not found !!!";
  </code></pre>
  
  <p>BUT When I remove <code>LIKE '%$_GET[query]%'</code>and make a simple query without <code>LIKE</code> , it return results.</p>