本文整理汇总了PHP中MY_Model::_generate_dropdown_list方法的典型用法代码示例。如果您正苦于以下问题:PHP MY_Model::_generate_dropdown_list方法的具体用法?PHP MY_Model::_generate_dropdown_list怎么用?PHP MY_Model::_generate_dropdown_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MY_Model
的用法示例。
在下文中一共展示了MY_Model::_generate_dropdown_list方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_dropdown_list
public function get_dropdown_list($default_title = '')
{
$sql = "SELECT id, CONCAT(first_name, ' ', last_name) AS title " . " FROM #__staff " . " ORDER BY last_name, first_name";
// echo $sql;exit;
$query = $this->db->query($sql);
return parent::_generate_dropdown_list($query->result(), $default_title);
}
示例2: get_dropdown_list
public function get_dropdown_list($default_title = '')
{
$sql = "SELECT id, title " . " FROM #__user_group " . " ORDER BY title";
$query = $this->db->query($sql);
return parent::_generate_dropdown_list($query->result(), $default_title);
}
示例3: get_dropdown_list
public function get_dropdown_list($default_title = '')
{
$sql = "SELECT number, CONCAT('number, ' - ', location) AS title " . " FROM #__postal_district " . " ORDER BY number";
$query = $this->db->query($sql);
return parent::_generate_dropdown_list($query->result(), $default_title);
}
示例4: get_dropdown_list
public function get_dropdown_list($default_title = '')
{
$sql = "SELECT id, name AS title " . " FROM #__site " . " WHERE is_published = 'True'" . " ORDER BY name";
$query = $this->db->query($sql);
return parent::_generate_dropdown_list($query->result(), $default_title);
}
示例5: get_owner_type_dropdown_list
public function get_owner_type_dropdown_list($default_title = '')
{
$result = array('None' => 'None', 'Participant' => 'Participant', 'Worksite' => 'Worksite', 'Company' => 'Company');
return parent::_generate_dropdown_list($result, $default_title);
}