Requête de base de données échouée (erreur # %s): %s ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction SQL=INSERT INTO "fhj_assets" ("name","title","parent_id","level","lft","rgt") VALUES ('com_modules.module.88','SCLogin',18,2,72,73) RETURNING id
Updating that to the below should make it work for you:$query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";
That uses the Joomla SQL abstraction layer, which we should have been doing already, to parse the query into Postgre properly.$query = $db->getQuery(true);
$query->select("template")
->from("#__template_styles")
->where("client_id = 0")
->where("home = 1");
$query = "SELECT * FROM #__opengraph_object";
if ($publishedOnly)
$query .= " WHERE published=1";
$query = $this->_db->getQuery(true);
$query->select('*')
->from($this->_db->qn('#__opengraph_object'));
if ($publishedOnly)
$query->where($this->_db->qn('published') . '=1');
private function setObjectMappings($actionId, $objects)
{
$filter = JFilterInput::getInstance();
// Delete all previous associations
$this->_db->setQuery("DELETE FROM #__opengraph_action_object WHERE action_id = " . $actionId);
$this->_db->execute();
foreach ($objects as $objectId)
{
$objectId = $filter->clean($objectId, 'INT');
if (is_int($objectId))
{
$this->_db->setQuery("INSERT INTO #__opengraph_action_object (`action_id`, `object_id`) VALUES " .
"(" . $actionId . ", " . $objectId . ")");
$this->_db->execute();
}
}
}
private function setObjectMappings($actionId, $objects)
{
$filter = JFilterInput::getInstance();
// Delete all previous associations
$query = $this->_db->getQuery(true);
$query->delete($this->_db->qn("#__opengraph_action_object"))
->where($this->_db->qn("action_id") . '=' . $actionId);
$this->_db->setQuery($query);
$this->_db->execute();
$columns = array('action_id', 'object_id');
$query = $this->_db->getQuery(true);
$query->insert($this->_db->qn("#__opengraph_action_object")
->columns($this->_db->qn($columns));
foreach ($objects as $objectId)
{
$objectId = $filter->clean($objectId, 'INT');
if (is_int($objectId))
{
$query->clear('values');
$query->values($actionId . ',' . $objectId);
$this->_db->setQuery($query);
$this->_db->query();
}
}
}
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.