隱形天堂 一個原汁原味的天堂


    MySQL資料庫刪除玩家方法

    分享

    Admin
    Admin

    文章數 : 134
    注冊日期 : 2010-09-27

    MySQL資料庫刪除玩家方法

    發表  Admin 于 周一 9月 27, 2010 7:52 am

    set @a = 'test1';

    delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_buff` where char_obj_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_config` where object_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_items` where char_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_quests` where char_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_skills` where char_obj_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_teleport` where char_id in (select objid from characters where characters.account_name = @a);
    delete FROM `character_warehouse` where account_name = @a;
    delete FROM `characters` where characters.account_name = (select login from accounts where login = @a);

      現在的時間是 周四 6月 21, 2018 4:41 am