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();
}