当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseModel::selectSingle方法代码示例

本文整理汇总了PHP中BaseModel::selectSingle方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseModel::selectSingle方法的具体用法?PHP BaseModel::selectSingle怎么用?PHP BaseModel::selectSingle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseModel的用法示例。


在下文中一共展示了BaseModel::selectSingle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: selectForDetail

 public function selectForDetail($id)
 {
     $this->mapping->fields['id'] = 'typeID';
     $this->mapping->fields['title'] = 'typeTitle';
     $this->mapping->fields['parent'] = 'typeParentID';
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'typeID';
     $this->mapping->criterias['id']->operator = '=';
     $this->mapping->criterias['id']->value = $id;
     return parent::selectSingle($id);
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:11,代码来源:class.TypeModel.php

示例2: selectForInfo

 public function selectForInfo($id)
 {
     $this->mapping->table .= " AS mainTable";
     $this->mapping->fields['infoName'] = 'CONCAT(accountFirstName,"",acountLastName)';
     $this->mapping->fields['createdAt'] = 'createdAt';
     $this->mapping->fields['updatedBy'] = '(SELECT userLogin FROM users WHERE userID = mainTable.updatedBy)';
     $this->mapping->fields['updatedAt'] = 'updatedAt';
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'accountID';
     $this->mapping->criterias['id']->operator = '=';
     $this->mapping->criterias['id']->value = $id;
     $row = parent::selectSingle($data);
     $this->mapping->table = str_replace(" AS mainTable", "", $this->mapping->table);
     return $row;
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:15,代码来源:class.AccountModel.php

示例3: selectForDetail

 public function selectForDetail($id)
 {
     $this->mapping->fields['id'] = 'brandID';
     $this->mapping->fields['title'] = 'brandTitle';
     $this->mapping->fields['album'] = 'albumID';
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'brandID';
     $this->mapping->criterias['id']->operator = '=';
     $this->mapping->criterias['id']->value = $id;
     $data = parent::selectSingle($id);
     // Recupera fotos a partir do album
     if ($this->photoModel && $data) {
         $data->photos = $this->photoModel->selectAlbum($data->album);
     }
     return $data;
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:16,代码来源:class.BrandModel.php

示例4: checkLogin

 public function checkLogin($data)
 {
     $this->mapping->fields['id'] = 'userID';
     $this->mapping->fields['name'] = 'userName';
     $this->mapping->fields['blocked'] = 'userBlocked';
     $this->mapping->criterias['user'] = new stdclass();
     $this->mapping->criterias['user']->field = 'userLogin';
     $this->mapping->criterias['user']->operator = '=';
     $this->mapping->criterias['user']->value = $data->user;
     $this->mapping->criterias['password'] = new stdclass();
     $this->mapping->criterias['password']->field = 'userPassword';
     $this->mapping->criterias['password']->operator = '=';
     $this->mapping->criterias['password']->value = md5($data->password);
     return parent::selectSingle($data);
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:15,代码来源:class.UserModel.php


注:本文中的BaseModel::selectSingle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。