我正在使用 Joomla 3.1 并且在代码中有一个错误 1054 Unknown column 'Array' 请帮我修复它。
protected function getOptions()
{
// Initialize variables.
$options = array();
$varname = (string) $this->element['varname'];
$project_id = JFactory::getApplication()->input->get($varname);
if (is_array($project_id)) {
$project_id = $project_id[0];
}
if ($project_id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('id AS value');
$query->select('CASE LENGTH(name) when 0 then CONCAT('.$db->Quote(JText::_('COM_JOOMLEAGUE_GLOBAL_MATCHDAY_NAME')). ', " ", id) else name END as text ');
$query->from('#__joomleague_round ');
$query->where('project_id = '.$project_id);
$query->order('roundcode');
$db->setQuery($query);
$options = $db->loadObjectList();
}