本文整理匯總了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;
}