本文整理匯總了PHP中game::getFieldUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP game::getFieldUser方法的具體用法?PHP game::getFieldUser怎麽用?PHP game::getFieldUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類game
的用法示例。
在下文中一共展示了game::getFieldUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ceil
}
$total = $game->selectTotal($info['selected'], $time);
$number = 0;
if ($total) {
$number = ceil($game->getTotal($time) / $total);
}
$value['go'] = array('selected' => $info['selected'], 'right' => $game->selectTotal($info['selected'], $time, $request['uid']), 'income' => $number);
echo json_encode($value);
}
// 添加選擇
if ($key == 'set_user_select') {
$user = $request['uid'];
$tag = $request['tag'];
$selected = $request['select'];
if ($tag && $user && $selected) {
$info = $game->getFieldUser($tag, $user);
// 修改選擇
if ($info) {
$game->setFieldUserSelected($tag, $user, $selected);
echo json_encode('update');
// 新增選擇
} else {
$game->selectAdd($user, $tag, $selected);
$game->setUserScore($user, -1);
echo json_encode('add');
}
}
}
// 獲取用戶基本信息,根據名稱,且快速登錄
if ($key == 'get_user_byname') {
$uid = $request['uid'];
示例2: ceil
$value['res'][$i] = $game->selectTotal($i, $time);
}
$total = $game->selectTotal($info['selected'], $time);
$number = 0;
if ($total) {
$number = ceil($game->getTotal($time) / $total);
}
$value['go'] = array('selected' => $info['selected'], 'right' => $game->selectTotal($info['selected'], $time, $request['uid']), 'income' => $number);
echo json_encode($value);
}
// 添加選擇
if ($key == 'set_user_select') {
$user = $request['uid'];
$tag = $request['tag'];
$selected = $request['select'];
$info = $game->getFieldUser($tag, $user);
// 修改選擇
if ($info) {
$game->setFieldUserSelected($tag, $user, $selected);
echo json_encode('update');
// 新增選擇
} else {
$game->selectAdd($user, $tag, $selected);
$game->setUserScore($user, -1);
echo json_encode('add');
}
// $game -> selectAdd($request['uid'], $request['select']);
// echo json_encode($request['uid']);
// echo json_encode($info);
}
// 獲取用戶基本信息