Jump to content
  • 0

How to WIPE a specify item on database?


Question

3 answers to this question

Recommended Posts

Posted

You can, though you'd have to write 4x more queries for it, it's still do-able. Here's an example for cart_inventory;

UPDATE `cart_inventory` SET `card0` = '0' WHERE `cart_inventory`.`card0` = 'XXXX';
UPDATE `cart_inventory` SET `card1` = '0' WHERE `cart_inventory`.`card1` = 'XXXX';
UPDATE `cart_inventory` SET `card2` = '0' WHERE `cart_inventory`.`card2` = 'XXXX';
UPDATE `cart_inventory` SET `card3` = '0' WHERE `cart_inventory`.`card3` = 'XXXX';

Replace XXXX with the Item ID of the MVP Card you wanted to delete. Setting it to 0 is better than deleting it, for me at least.

  • Upvote 1
Posted (edited)
DELETE FROM `table_name` WHERE condition1 = "string" OR condition2 = number AND condition3 = "whatever";

ex:

DELETE FROM `global_reg_value` WHERE `str` = "#CASHPOINTS" AND account_id = 20000;

to embed with a NPC script, it will be:

query_sql("DELETE FROM `global_reg_value` WHERE `str` = "#CASHPOINTS" AND account_id = "+escape_sql(getcharid(3))+"");

SQL::DELETE. Refer: http://www.w3schools.com/sql/sql_delete.asp

how did I found this out? https://www.google.com/

Edited by Winz
  • Upvote 1

Join the conversation

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

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...