SQL Queries

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
How would i remove items from characters hands, stores bags etc using a SQL query??

Thanks in advance for any replies i get
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
How would i remove items from characters hands, stores bags etc using a SQL query??

Thanks in advance for any replies i get

You have to do it when 'someone' is not logged in.
DELETE FROM TBL_ITEM WHERE FLD_CHARACTER='someone'
DELETE FROM TBL_SAVEDITEM WHERE FLD_CHARACTER='someone'
 

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
does that allow me to remove certain items?? or all there items??
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
does that allow me to remove certain items?? or all there items??


those will remove ALL items from bag, body, storage.
if you want to remove specific ones you have to find out the stditem index etc...
 

Sammy

Dedicated Member
Dedicated Member
Sep 9, 2007
66
1
54
DELETE FROM TBL_ITEM WHERE FLD_INDEX='Number'
DELETE FROM TBL_SAVEDITEM WHERE FLD_INDEX='Number'

or

DELETE FROM TBL_ITEM WHERE FLD_NAME='ItemName'
DELETE FROM TBL_SAVEDITEM WHERE FLD_NAME='ItemName'

or

DELETE FROM TBL_ITEM WHERE FLD_INDEX='IndexNumber' FLD_NAME='ItemName'
DELETE FROM TBL_SAVEDITEM WHERE FLD_INDEX='IndexNumber' FLD_NAME='ItemName'

---------------------

so would that delete the certain items im looking for if i filled in the correct index?? or name??

would they work for example would test em but dont wanna mess around with stuff like this incase i take away something i dont mean too :P
 
Last edited:

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
okay..

to list what user has in their body and bag.
SELECT * FROM TBL_ITEM WHERE FLD_CHARACTER='someone'

to list what user has in their storage.
SELECT * FROM TBL_SAVEDITEM WHERE FLD_CHARACTER='someone'

this will remove all items from 1 char.
DELETE FROM TBL_ITEM WHERE FLD_CHARACTER='someone'
DELETE FROM TBL_SAVEDITEM WHERE FLD_CHARACTER='someone'

this will remove all items that has an INDEX 1 (equals to stditems index 0) from ALL chars.
DELETE FROM TBL_ITEM WHERE FLD_INDEX=1
DELETE FROM TBL_SAVEDITEM WHERE FLD_INDEX=1

this will remove all items that has an INDEX 1 (equals to stditems index 0) from 1 char.
DELETE FROM TBL_ITEM WHERE FLD_INDEX=1 AND FLD_CHARACTER='someone'
DELETE FROM TBL_SAVEDITEM WHERE FLD_INDEX=1 AND FLD_CHARACTER='someone'