本文整理汇总了PHP中BaseModel::select方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseModel::select方法的具体用法?PHP BaseModel::select怎么用?PHP BaseModel::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseModel
的用法示例。
在下文中一共展示了BaseModel::select方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select
public function select()
{
$this->mapping->fields['id'] = 'faqID';
$this->mapping->fields['title'] = 'faqTitle';
$this->mapping->fields['text'] = 'faqText';
$data = new stdClass();
$data->order = "faqTitle";
return parent::select($data);
}
示例2: selectChildComboType
public function selectChildComboType($id)
{
$this->mapping->fields['id'] = 'typeID';
$this->mapping->fields['text'] = 'typeTitle';
$this->mapping->criterias['parent'] = new stdclass();
$this->mapping->criterias['parent']->field = 'typeParentID';
$this->mapping->criterias['parent']->operator = '=';
$this->mapping->criterias['parent']->value = $id;
return parent::select($data);
}
示例3: getComboRoles
public function getComboRoles()
{
$this->mapping->table = 'roles';
$this->mapping->fields['id'] = 'roleID';
$this->mapping->fields['page'] = 'rolePageID';
$this->mapping->criterias['id'] = new stdclass();
$this->mapping->criterias['id']->field = 'roleParentID';
$this->mapping->criterias['id']->operator = 'IS';
$this->mapping->criterias['id']->value = NULL;
$result = parent::select($dummy);
// Preenche as descrições conforme idioma configurado
foreach ($result as $row) {
$row->text = Text::read('title.' . $row->page);
}
return $result;
}
示例4: selectComboBrand
public function selectComboBrand()
{
$this->mapping->fields['id'] = 'brandID';
$this->mapping->fields['text'] = 'brandTitle';
return parent::select($data);
}