SELECT * FROM `eod_game`.`table_player` WHERE (`user_id` IN (27, 82));

SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` = 'Weapon') LIMIT 1;

SELECT * FROM `eod_game`.`table_player_character` 
WHERE (`owner_user_id` = (SELECT `user_id` FROM `eod_game`.`table_player` 
                          WHERE (`nickname` = '카인No4'))) LIMIT 4;
                          
SELECT * FROM `eod_game`.`table_stage_record` WHERE (`character_id` = 187) LIMIT 1;

SELECT * FROM `eod_game`.`table_player_character` WHERE (`character_id` = 92);
SELECT * FROM `eod_game`.`table_player_character` WHERE (`level` >= 50) ORDER BY `last_played_datetime` DESC;


SELECT MAX(`item_id`) FROM `eod_game`.`table_equipment_item`;

SELECT COUNT(1) FROM `eod_game`.`table_player` WHERE (`last_accessed_datetime` >= ('2017-02-14 18:00:00'));

SELECT COUNT(1) FROM `eod_game`.`table_player_character` WHERE (`level` <= 3);



SELECT * FROM `eod_authentication`.`table_account_user` WHERE (`nickname` = '리리');

SELECT * FROM `eod_authentication`.`table_account_relationship` 
WHERE (`user_id` = (SELECT `user_id` FROM `eod_authentication`.`table_account_user` WHERE (`nickname` = '리리')));

SELECT * FROM `eod_authentication`.`table_account_relationship` 
WHERE (`user_id` = (SELECT `user_id` FROM `eod_authentication`.`table_account_user` WHERE (`nickname` = '토킹')));



SELECT * FROM `eod_game`.`table_player_character` INNER JOIN
    (SELECT `user_id` FROM `eod_game`.`table_player` WHERE (`nickname` = '고고')) AS PlayerTable
WHERE (`owner_user_id` = PlayerTable.`user_id`);






SHOW VARIABLES LIKE '%max%';
SHOW VARIABLES LIKE 'tmp_table_size';
SHOW WARNINGS;
SHOW VARIABLES LIKE '%event%';

select max(log_no) from table_equipment;

select max(item_id) from table_equipment_item;
----- 322909 -------

DELIMITER $

declare count int default(0);
declare max_count int default(100000);

while(count < max_count)

INSERT INTO `eod_game`.`table_equipment_item`
SET
    `item_code` = 150501002,
`owner_character_id` = 94,
`state` = 0, 
`fixed_options` = '',
`random_options` = '[{"divisionCode":53,"dataType":1,"value":6.0276413},{"divisionCode":28,"dataType":0,"value":840.2004}]',
`enhance_level` = 0,
`runestone_socket_size` = 0,
`runestone_socket1` = 0,
`runestone_socket2` = 0,
`locked` = 0,
`option_change_state` = 0,
`option_change_target` = -1,
`option_change_nominates` = '',
`option_change_count` = 0,
`update_datetime` = NOW(),
`creation_datetime` = NOW();

set count = count + 1;

end while

select max_count;

DELIMITER;




INSERT INTO `eod_game`.`table_equipment_item`
SET
    `item_code` = 150501002,
`owner_character_id` = 94,
`state` = 0, 
`fixed_options` = '',
`random_options` = '[{"divisionCode":53,"dataType":1,"value":6.0276413},{"divisionCode":28,"dataType":0,"value":840.2004}]',
`enhance_level` = 0,
`runestone_socket_size` = 0,
`runestone_socket1` = 0,
`runestone_socket2` = 0,
`locked` = 0,
`option_change_state` = 0,
`option_change_target` = -1,
`option_change_nominates` = '',
`option_change_count` = 0,
`update_datetime` = NOW(),
`creation_datetime` = NOW();


