title: SQL query with joomla
body: <p>I have problem with my SQL query.</p>
  
  <p>I try to eject these queries and the result is nothing.</p>
  
  <pre><code>$query =$db-&gt;getQuery(true);
  $query-&gt;select($db-&gt;quoteName('name'));
  $query-&gt;from($db-&gt;quoteName('#__restaurant'));
  $query-&gt;where($db-&gt;quote(constant("$vector[0]")) . '=' . $db-&gt;quote($v[$vector[0]]));
  $db-&gt;setQuery($query);
  $column=$db-&gt;loadObjectList();
  </code></pre>
  
  <p>.......</p>
  
  <pre><code>$query= $db-&gt;getQuery(true);
  $query-&gt;select($db-&gt;quoteName('name'));
  $query-&gt;from($db-&gt;quoteName('#__restaurant'));
  $query-&gt;where($db-&gt;quoteName('zone'). '=' . $db-&gt;quoteName('atocha'));
  $db-&gt;setQuery($query);
  $column=$db-&gt;loadObjectList();
  </code></pre>
  
  <p>The database is not empty, but I why there is no results.
  Any idea!!!</p>
  
  <p>thanks </p>
  
  <p>Thanks everyone I execute this </p>
  
  <pre><code>$query= "SELECT *
  FROM ".$db-&gt;nameQuote('#__restaurantes')."
  WHERE ".$db-&gt;nameQuote('tipe')."=".$db-&gt;quote($v[$vector[0]]).";";
  $db-&gt;setQuery($query);
  $column=$db-&gt;loadObjectList();
  </code></pre>
  
  <p>and obtain this </p>
  
  <p>SELECT * FROM <code>#__restaurantes</code> WHERE tipe='';sol</p>
  
  <p>any idea</p>
  
  <p>thanks</p>