1
This commit is contained in:
parent
3a65766e2a
commit
1520ae6710
@ -40,6 +40,34 @@ class SignController{
|
|||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$row1 = $conn->execQueryOne('SELECT * FROM user WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id
|
||||||
|
));
|
||||||
|
if (!$row1) {
|
||||||
|
$ret = $conn->execScript('INSERT INTO user(accountid, rank, game_times, win_times, kills, harm, add_HP, alive_time, coin_num, integral, kill_his, alive_time_his, harm_his, add_HP_his) ' .
|
||||||
|
' VALUES(:accountid, 0, 0, 0, 0, 0, 0, 0, 100000, 0, 0, 0, 0, 0);',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id
|
||||||
|
));
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg' => '',
|
||||||
|
'game_times' => 0,
|
||||||
|
'win_times' => 0,
|
||||||
|
'high_kill' => 0,
|
||||||
|
'kills' => 0,
|
||||||
|
'high_harm' => 0,
|
||||||
|
'harm' => 0,
|
||||||
|
'add_HP' => 0,
|
||||||
|
'alive_time' => 0,
|
||||||
|
'coin_num' => 100000,
|
||||||
|
));
|
||||||
|
}
|
||||||
$row = $conn->execQueryOne('SELECT * FROM sign WHERE accountid=:accountid;',
|
$row = $conn->execQueryOne('SELECT * FROM sign WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id
|
':accountid' => $account_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user