I don't understand the world right now. I try to make a simple query from the DB, but it fails with the message that the column is not known. I do not understand why Joomla! tries to see the value I am looking for as a column. This is my query:
$data = new stdClass();
try{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select('*')
->from($db->quoteName('#__extensions'));
$query->where($db->quoteName('element') . " = " . $db->quoteName('com_componentname'));
$db->setQuery($query);
$data->params = $db->loadObject();
}catch(Exception $e){
$data->query = $query->dump();
$data->errormsg = $e->getMessage();
}
return $data;
}else{
return false;
}
The response is:
'errormsg' => 'Unknown column \'com_componentname\' in \'where clause\'',
Why does Joomla! try to find the component name as a column? What I want: Where componentname in Columns name from table extensions.
Or is there another / better way to load the parameters of a component within a module?