隱形天堂

Would you like to react to this message? Create an account in a few clicks or log in to continue.

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


    MySQL資料庫刪除玩家方法

    avatar
    Admin
    Admin


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

    MySQL資料庫刪除玩家方法 Empty 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);

      現在的時間是 周日 11月 24, 2024 12:18 pm