本文整理汇总了PHP中models\UserAccountModel::setFromDataBaseRow方法的典型用法代码示例。如果您正苦于以下问题:PHP UserAccountModel::setFromDataBaseRow方法的具体用法?PHP UserAccountModel::setFromDataBaseRow怎么用?PHP UserAccountModel::setFromDataBaseRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models\UserAccountModel
的用法示例。
在下文中一共展示了UserAccountModel::setFromDataBaseRow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadByID
public function loadByID($userID)
{
global $DB;
$stat = $DB->prepare("SELECT user_account_information.* FROM user_account_information WHERE id =:id");
$stat->execute(array('id' => $userID));
if ($stat->rowCount() > 0) {
$user = new UserAccountModel();
$user->setFromDataBaseRow($stat->fetch());
return $user;
}
}
示例2: loadByOwnerOfCuratedList
public function loadByOwnerOfCuratedList(CuratedListModel $curatedList)
{
global $DB;
$stat = $DB->prepare("SELECT user_account_information.* FROM user_account_information " . " JOIN user_in_curated_list_information ON user_in_curated_list_information.user_account_id = user_account_information.id " . "WHERE user_in_curated_list_information.curated_list_id = :id AND user_in_curated_list_information.is_owner = 't'");
$stat->execute(array('id' => $curatedList->getId()));
if ($stat->rowCount() > 0) {
$user = new UserAccountModel();
$user->setFromDataBaseRow($stat->fetch());
return $user;
}
}
示例3: fetchAll
public function fetchAll()
{
$this->buildStart();
$this->build();
$this->buildStat();
$results = array();
while ($data = $this->stat->fetch()) {
$event = new UserAccountModel();
$event->setFromDataBaseRow($data);
$results[] = $event;
}
return $results;
}