-- player_id : 20000000000070061
-- character_id : 20000000000079444


-- 플레이어 정보 확인
SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` = '청심인');


-- 캐릭터 정보 확인
SELECT * FROM `eod_game`.`table_player_character` AS characterTable
INNER JOIN 
(
    SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` = '청심인')
) AS selectedPlayerTable
ON (characterTable.`owner_user_id` = selectedPlayerTable.`user_id`);


-- 재화 아이템의 확인
SELECT * FROM `eod_game`.`table_worth` 
WHERE (`character_id` = 20000000000061496) AND
      (`worth_code` = 160000601);


-- 젬 회수
EXPLAIN UPDATE `eod_game`.`table_player` 
SET
    `money_gamecash_by_purchase` = `money_gamecash_by_purchase` - 10000
WHERE (`user_id` = 20000000000070061);


-- 재화 아이템의 회수
EXPLAIN UPDATE `eod_game`.`table_player_character` 
SET
    `money_gameplay` = `money_gameplay` - 2000000
WHERE (`character_id` = 20000000000079444);


EXPLAIN UPDATE `eod_game`.`table_worth` 
SET
    `amount` = `amount` - 2
WHERE (`character_id` = 20000000000061496) AND 
      (`worth_code` = 160000601);