[Release] Completely Delete An Item

07/03/2013 23:26 -HiwatariKai*#1
Hello epvp. I prepared a small query. With this query you can delete all the characters item. I hope help you.

Quote:
USE [SRO_VT_SHARD]

/* ***** -HiwatariKai* ***** */


DECLARE @Codename128 VARCHAR(128)SET @Codename128 = 'ITEM_MALL_GLOBAL_CHATTING' -- Write code to delete item
UPDATE _Inventory SET ItemID = 0 FROM _Inventory JOIN _Items ON _Items.ID64 = _Inventory.ItemID JOIN _RefObjCommon ON _Items.RefItemID = _RefObjCommon.ID WHERE _RefObjCommon.CodeName128 = @Codename128
UPDATE _Chest SET ItemID = 0 FROM _Chest JOIN _Items ON _Items.ID64 = _Chest.ItemID JOIN _RefObjCommon ON _Items.RefItemID = _RefObjCommon.ID WHERE _RefObjCommon.CodeName128 = @Codename128
UPDATE _GuildChest SET ItemID = 0 FROM _GuildChest JOIN _Items ON _Items.ID64 = _GuildChest.ItemID JOIN _RefObjCommon ON _Items.RefItemID = _RefObjCommon.ID WHERE _RefObjCommon.CodeName128 = @Codename128
UPDATE _InvCOS SET ItemID = 0 FROM _InvCOS JOIN _Items ON _Items.ID64 = _InvCOS.ItemID JOIN _RefObjCommon ON _Items.RefItemID = _RefObjCommon.ID WHERE _RefObjCommon.CodeName128 = @Codename128
07/04/2013 00:01 Haxor#2
#Approved
07/04/2013 00:18 -HiwatariKai*#3
Thanks.

Sorry for my bad English. :)
07/04/2013 04:15 magicanoo#4
You know you can use seek and destroy procedure,right?

PHP Code:
exec _SEEK_N_DESTROY_ITEM 'ITEM_MALL_GLOBAL_CHATTING' 
07/04/2013 06:37 Almouhissen#5
KRALLLAR RELEASE^^
07/04/2013 11:57 mohamedlove1#6
Quote:
Originally Posted by magicanoo View Post
You know you can use seek and destroy procedure,right?

PHP Code:
exec _SEEK_N_DESTROY_ITEM 'ITEM_MALL_GLOBAL_CHATTING' 
o.O I Wasn't Know it :@ kidding us ?
07/04/2013 11:58 -HiwatariKai*#7
Quote:
Originally Posted by magicanoo View Post
You know you can use seek and destroy procedure,right?

PHP Code:
exec _SEEK_N_DESTROY_ITEM 'ITEM_MALL_GLOBAL_CHATTING' 
I know this query. It is Alternative B :)
07/04/2013 14:21 MaDenGo*#8
Thank you
07/04/2013 14:23 -HiwatariKai*#9
Quote:
Originally Posted by MaDenGo* View Post
Thank you
NP Bro. I hope help you. :)
07/04/2013 23:43 IceAmStiel#10
You aren't deleting the items, you're just removing them from players. You should add a query that sets _ItemPool.InUse to 0 for affected ID64's, By setting the _ItemPool.InUse column to 0 it frees the record from _Items for further use in the database. Otherwise the record will stay unused and waste crucial space depending on the times you run your query.
07/05/2013 00:17 IceAmStiel#11
Quote:
Originally Posted by Phoenix 1337 View Post
[Only registered and activated users can see links. Click Here To Register...]

Nuff said.
And yeah, If you dont know it, I'm begodofwar
How is this messy thread supposed to be related to my post? ;D
07/05/2013 01:38 -HiwatariKai*#12
Quote:
Originally Posted by IceAmStiel View Post
You aren't deleting the items, you're just removing them from players. You should add a query that sets _ItemPool.InUse to 0 for affected ID64's, By setting the _ItemPool.InUse column to 0 it frees the record from _Items for further use in the database. Otherwise the record will stay unused and waste crucial space depending on the times you run your query.
Yes lol. I write "DELETE FROM ALL CHARECTERS". Im not noop.
07/05/2013 10:19 IceAmStiel#13
Quote:
Originally Posted by -HiwatariKai* View Post
Yes lol. I write "DELETE FROM ALL CHARECTERS". Im not noop.
You didn't..

Quote:
Originally Posted by -HiwatariKai* View Post
Hello epvp. I prepared a small query. With this query you can delete all the characters item. I hope help you.
= delete the items of characters. And it's "noop" to not free the records afterwards as they're not going to be used anymore. It simply consumes unnecessarily space at your db and might slower queries that are ran on _Items.

My latter post was supposed to be constructive criticism, yet you took it as an offense..
07/05/2013 10:24 鳳凰城#14
Quote:
Originally Posted by IceAmStiel View Post
How is this messy thread supposed to be related to my post? ;D
Sorry meant another post. I was opening both threads together.