so i am trying to perform my own databse cleanup(as i and about 4 other people have already mad a char with the existing db) but everytime i try to delete all account but ours they are all gone...i know verry little about SQL but this should be pretty simple should it not...this is what query i am running on the account database:
delete * from tbl_user where user_no<>firstnumber or user_no<>secondnumber or user_no<>thirdnumber or user_no<>fourthnumber
but all accounts are gone even the ones with said user numbers....i'm sure i will probably get flamed for this but i tried all day yesterday and everytime it got ride of everything...i tired putting the numbers between '',using != instead of <> even tried using the user id's instead....if i do a select query for user_no = to what i want then it works...but if i say <> then i get all records returned
any ideas?
edit:I could just delete all account and have everyone create a new account then move chars over but i should be able to just delete all accounts but the ones i want to keep....
I haven't done much with SQL either, but I think I've found the error in your query.
Try this:
Code:
delete from tbl_user where user_no!=[i]firstnumber[/i] and user_no!=[i]secondnumber[/i] and user_no!=[i]thirdnumber[/i] and user_no!=[i]fourthnumber[/i]
i will try that but my understanding of and,or was this...using or it will test each condition on each record that it reads...using and i will combine the conditions and check against records....so i'm not sure this will work either....maybe sql does not treat and,or this way..?
If you use or, only at least 1 condition needs to be true. If you use and, all conditions need to be true.
That also explains why all accounts got deleted when you used or.
I have been using this script to clean up the whole Character database with the exception of the DEV characters. NOTE: the DEV characters are needed to create a new character. The server grabs the info in the DEV account a copies it over to your new char. Without them, this process fails. Anyways the second reply is correct, but also remember you can clean up the user bag, suit, store.... All you need to know is the "character_no". You can also use this script to clean the account DB, just change the fileds. WARNING: The script also deletes the guilds along with some other stuff. Read the script a little before you run it.
***EDIT: added MASTERCODE to guild_info and guild_peerage. Without these you will not be able to create guilds.
Open any table in the character DB then click on the SQL button. Remove SELECT * FROM theTableYouAreIn, paste the section below, then click on the !
DELETE FROM user_character
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE FROM GUILD_CHAR_INFO
DELETE FROM GUILD_INFO
WHERE (guild_code NOT IN ('MASTERCODE'))
DELETE FROM GUILD_INFO_SECEDE
DELETE FROM GUILD_PEERAGE
WHERE (guild_code NOT IN ('MASTERCODE'))
DELETE FROM user_bag_copy
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE user_bag_secede
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE user_character_secede
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE USER_POSTBOX
DELETE USER_POSTBOX_SECEDE
DELETE user_storage_copy
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE USER_STORE_copy
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
DELETE user_suit_copy
WHERE (character_no NOT IN ('DEKARON0000001', 'DEKARON1000001', 'DEKARON2000001', 'DEKARON3000001', 'DEKARON4000001', 'DEKARON5000001'))
[Question] Database 03/11/2010 - EO PServer Hosting - 8 Replies Is there a script that you can run to clean out your database. I've noticed there is a lot of things left over from the previous owner.
DK Database question 08/12/2009 - Dekaron Private Server - 0 Replies while trying to help someone fix a prob i ran into something that i would like to get clarification on if anyone knows. in the billing database in table user_account what is the point of the remain_time remain_freetime and the expiration. i assumed that an account with 0 remain time and expired date that has passed would not be able to login. but that does not seem to be the case.....
question about getting database 05/25/2009 - SRO Private Server - 10 Replies Hi all,just wondering how people gets original database from Sro,i mean they pay for it?they stole it?
People from ecsro made it,but they donīt have the whole thing,so that make me guess they just stole it or something.
Wanna know your opinnions :mofo:
Cleanup? 04/04/2008 - Dekaron - 8 Replies Can we request a cleanup of the 2moons hack sections, or maybe just a thread that lists current working hacks for the BMR patch, so we dont have to go searching everywhere in the planet for them if/when they are created and released. Just an idea.
Forum cleanup 06/13/2006 - Conquer Online 2 - 24 Replies I was wondering, who else would like the forums to be cleaned up, basicaly all posts reset, we can pin the new bots, I cant find anything I look for so I know its the same for everyone else. So maybe we could let the Epvpers vote on a forum reset, then repost bots. We can tell by Karma who posted what bots before so noone steals credit ^^