Jump to content
Nox

SQL Clean Up

Recommended Posts

If you are using A Plot for Life v2+ then standard cleardown scripts used with Vanilla Epoch listed in this thread should work fine as it stores the characterID just as vanilla Epoch does along with saving the PlayersUID in a different field.

Share this post


Link to post
Share on other sites

i tried using that,

delete FROM `Character_DATA`

USING character_data, character_data AS tmpcharacter_data

WHERE NOT character_data.CharacterID=tmpcharacter_data.CharacterID

AND character_data.CharacterID<tmpcharacter_data.CharacterID

AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID)

but it doesnt work, i get an error says  Unknown table 'Character_DATA' in MULTI DELETE

but my table is called Character_DATA, when i change it to character_data it wont give me an error

Share this post


Link to post
Share on other sites

i tried using that,

delete FROM `Character_DATA`

USING character_data, character_data AS tmpcharacter_data

WHERE NOT character_data.CharacterID=tmpcharacter_data.CharacterID

AND character_data.CharacterID<tmpcharacter_data.CharacterID

AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID)

but it doesnt work, i get an error says  Unknown table 'Character_DATA' in MULTI DELETE

but my table is called Character_DATA, when i change it to character_data it wont give me an error

 

Using this if u have Character_DATA:

delete FROM `Character_DATA`

USING Character_DATA, Character_DATA AS tmpcharacter_data

WHERE NOT Character_DATA.CharacterID=tmpcharacter_data.CharacterID

AND Character_DATA.CharacterID<tmpcharacter_data.CharacterID

AND (Character_DATA.PlayerUID=tmpcharacter_data.PlayerUID)

or use this if u have character_data

delete FROM `character_data`

USING character_data, character_data AS tmpcharacter_data

WHERE NOT character_data.CharacterID=tmpcharacter_data.CharacterID

AND character_data.CharacterID<tmpcharacter_data.CharacterID

AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID)

Share this post


Link to post
Share on other sites
On 3.12.2013 at 11:13 AM, MGT said:
On 3.12.2013 at 8:25 AM, Nasdero said:

If you believe or not, sometimes ppl go for vacation and then you reset their humanity? Take this and they will keep their humanity:

 

 

delete FROM `character_data`

USING character_data, character_data AS tmpcharacter_data

WHERE NOT character_data.CharacterID=tmpcharacter_data.CharacterID

AND character_data.CharacterID<tmpcharacter_data.CharacterID

AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID)[/php]

 

 

Nice work

It doesnt work for me... It says: Error 1064: You have an error in ur SQL syntax; check the manual that corresponds to your MsQL server for the right SQL syntax to use near

'[/php] RETURN 0; END' at line 12

SQL PREVIEW:

CREATE DEFINER = CURRENT_USER FUNCTION `NewProc`()
 RETURNS integer
BEGIN
    DELETE FROM `Character_DATA`

        USING Character_DATA, Character_DATA AS tmpcharacter_data

        WHERE NOT Character_DATA.CharacterID=tmpcharacter_data.CharacterID

        AND Character_DATA.CharacterID<tmpcharacter_data.CharacterID

        AND (Character_DATA.PlayerUID=tmpcharacter_data.PlayerUID)[/php]

    RETURN 0;
END;;

 

Defenition:

 

BEGIN
    DELETE FROM `Character_DATA`

        USING Character_DATA, Character_DATA AS tmpcharacter_data

        WHERE NOT Character_DATA.CharacterID=tmpcharacter_data.CharacterID

        AND Character_DATA.CharacterID<tmpcharacter_data.CharacterID

    AND (Character_DATA.PlayerUID=tmpcharacter_data.PlayerUID)[/php]

    RETURN 0;
END;

 

Any help (Using nitrado that is why i changed the name to "Charakter_DATA"

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...