I have problem with my SQL query.
I try to eject these queries and the result is nothing.
$query =$db->getQuery(true);
$query->select($db->quoteName('name'));
$query->from($db->quoteName('#__restaurant'));
$query->where($db->quote(constant("$vector[0]")) . '=' . $db->quote($v[$vector[0]]));
$db->setQuery($query);
$column=$db->loadObjectList();
…….
$query= $db->getQuery(true);
$query->select($db->quoteName('name'));
$query->from($db->quoteName('#__restaurant'));
$query->where($db->quoteName('zone'). '=' . $db->quoteName('atocha'));
$db->setQuery($query);
$column=$db->loadObjectList();
The database is not empty, but I why there is no results.
Any idea!!!
thanks
Thanks everyone I execute this
$query= "SELECT *
FROM ".$db->nameQuote('#__restaurantes')."
WHERE ".$db->nameQuote('tipe')."=".$db->quote($v[$vector[0]]).";";
$db->setQuery($query);
$column=$db->loadObjectList();
and obtain this
SELECT * FROM #__restaurantes WHERE tipe=”;sol
any idea
thanks
Thanks you so much everyone !
I have the correct query, I put here for some one who has the same problem.