Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 23:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Query to Modify Anything in Any Column of Any Table in Any DB

Discussion on Query to Modify Anything in Any Column of Any Table in Any DB within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 63
Received Thanks: 23
Query to Modify Anything in Any Column of Any Table in Any DB

Damn this post was old already but it helped me alot, in fact not only helped me but also I'm a bit less nub in query stuff thanks to the advises that you guys gave me in the comments and thanks to my hard work (it will seem not hard for you but I guess you guys will understand what I'm saying) . Well those 2 query mean nothing compared to the changes I made at this one grabing what everyone said in comments here specialy what nubness said here my ty to you friend. Anyway here is the true query that can make all the stuff written in the tittle of this old thread I hope you like it guys


This time the explanation goes out of the Spoiler because I learned that XD. Well as you guys can see its not really dificult to understand this query if me that i'm nub in this can understand than those who don't well idk what to say than.

here goes first you put the DB where are the tables and columns you want to change you put here "UPDATE PS_Gamedefs" than you put the table here ".db.MobItems" its important that you know what is a DB and a table first. After that you can use 1 or many columns that you want at "SET Grade = 13" this if you want to change only 1 column and put the "," without the quotes after "SET Grade = 13" if you want to change more than 1 column. Now last step of the query is the conditions that you want them to have so the change can happen, just imagine you go to a shop and ask for a candy and you say I want a candy "only" if it has Orange taste, well in this part of the query the meaning of "conditions" is exact the same as the candy example so the line "WHERE MobID in (2011) AND ItemOrder in (1)" its exacly the same as "change those grades and droprates only if MobID is (2011) and ItemOrder is (1)". If you want to use more MobID and ItemOrder just put example (2011,103,104 etc..) in MobID and (1,2,3,4 etc...) in this case maximum is 9 per MobID in ItemOrder. Well here is my new work please give a thanks if you like and comment if you like too or feel that something isn't right or can be better. Ty guys.

Credits to: nubness + all members that already comented this post + me
shoree is offline  
Thanks
2 Users
Old 03/13/2014, 19:27   #2
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,451
this.Genius = true;
Like();
Share();
Comment();
Respect++;
nubness is offline  
Thanks
2 Users
Old 03/13/2014, 20:03   #3
 
TeddyBear94's Avatar
 
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,627
well this should be common sense actually. If you plan on creating a shaiya server you should know atleast a few sql.
but yet still a good for the ones that completly start new.
TeddyBear94 is offline  
Thanks
2 Users
Old 03/13/2014, 21:30   #4
 
shaiyadeveloper's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 63
Received Thanks: 2
This should definitely be categorized under "common sense." If you don't know how to change multiple rows with a simple UPDATE statement like in these text files on your own, you definitely shouldn't be blindly trusting another user's scripts.

A better alternative to this, would be a tutorial for SQL such as

That's a decent site for references to SQL commands, and gives you a basic understanding of the process of crafting an SQL statement suited for your needs, such as a change to multiple rows of a database.

Lastly, the line "Where MobID in (list)" should have IN capitalized as it is an SQL operator. Just formatting quirks that make things easier to read.
shaiyadeveloper is offline  
Thanks
1 User
Old 03/13/2014, 22:05   #5
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,451
Actually, SQL isn't a case sensitive language, which means IN = In = iN = in.

Also, for the #1 post, you can write this:
Code:
UPDATE PS_Gamedefs.dbo.MobItems
SET Grade = 0
UPDATE PS_Gamedefs.dbo.MobItems
SET DropRate = 0
in a less redundant way:
Code:
UPDATE PS_GameDefs.dbo.MobItems
SET Grade = 0, DropRate = 0
nubness is offline  
Thanks
2 Users
Old 03/13/2014, 22:12   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 63
Received Thanks: 23
tnx guys I apreciate you're advice in this since I'm nub yet but I'm learning what I can so thanks for any helps that already came and it may still come. Well that post I allways thought that there was no Query to edit moob drops that was what many DEV's told me when I started DEV in Shaiya so now that I created one or maybe 2 looks like 2 Query, I thought about posting here for those that are having the same question that I had which is "Is there any Query to edit the drops" now we can say YES
shoree is offline  
Old 03/14/2014, 04:13   #7
 
shaiyadeveloper's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 63
Received Thanks: 2
Quote:
Originally Posted by nubness View Post
Actually, SQL isn't a case sensitive language, which means IN = In = iN = in.
It's not case sensitive, no, but it's formatting that makes things easier to read. You don't want people writing code without indentation and incorrect capitalizing all over the place, that makes it a struggle to understand.
shaiyadeveloper is offline  
Old 03/14/2014, 12:54   #8
 
elite*gold: 0
Join Date: Feb 2014
Posts: 38
Received Thanks: 0
Guys pls im make the server but How can i make it online I really need help add me on ur skype : cold.wind3 Plssssss . ty
tadjer is offline  
Old 03/14/2014, 17:09   #9
 
shaiyadeveloper's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 63
Received Thanks: 2
Quote:
Originally Posted by tadjer View Post
Guys pls im make the server but How can i make it online I really need help add me on ur skype : cold.wind3 Plssssss . ty
I will not give you links to answer your question, and I hope that others reading this also refrain from giving them out.

All the answers you need are on this site. In the process of finding your answer, you will also find reasons NOT to make your server public until you are ready for it. When you have a public server, you open yourself up to being hacked and exploited, and if you don't know how to setup your server for public access, then you definitely don't know how to protect yourself from attackers.

Keep browsing the forums, reading and learning from guides, and you'll find your answer. And a lot of other answers you didn't even know you needed
shaiyadeveloper is offline  
Old 03/16/2014, 22:25   #10
 
elite*gold: 0
Join Date: Jul 2010
Posts: 511
Received Thanks: 513
The right question is not "Is there any Query to edit the drops", but (once you learn where to edit a drop) "how to update a table in sql server", which can be easily found on google.
sominus is offline  
Thanks
2 Users
Old 06/01/2014, 14:23   #11
 
elite*gold: 0
Join Date: Aug 2011
Posts: 63
Received Thanks: 23
I made this and right now I didn't knew how to do it XD but the good news is that in some hours I'll put my 1st server online and yes I just used the search tool here in epvp because I already know how this site works.
shoree is offline  
Old 06/01/2014, 14:31   #12
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,451
nubness is offline  
Thanks
6 Users
Old 06/06/2014, 18:18   #13
 
elite*gold: 0
Join Date: Aug 2011
Posts: 63
Received Thanks: 23
look at the edited thread guys if you like the new stuff
shoree is offline  
Thanks
1 User
Old 06/07/2014, 12:27   #14
 
elite*gold: 0
Join Date: Apr 2012
Posts: 33
Received Thanks: 7
tell me you are trolling with this topic, please.
kollegga is offline  
Old 06/08/2014, 09:36   #15
 
elite*gold: 0
Join Date: Aug 2011
Posts: 63
Received Thanks: 23
why would I been trolling? O.o
shoree is offline  
Reply


Similar Threads Similar Threads
Fehler bei Query Table infügen
01/01/2014 - Metin2 Private Server - 4 Replies
Hi, immer wenn ich ne query in der DB einfügen will kommt auf einmel der Fehler. Weiß wer was das ist ? Screen: http://img5.fotos-hochladen.net/uploads/gagak0vbe nca82.png greertings
ChildLoop: AsyncSQL: query failed: Unknown column FIXX
08/29/2013 - Metin2 Private Server - 7 Replies
Heyho habe folgendes Problem, das meine ganze Syserr vollspamt. Über eine sinnvolle Antwort würde ich mich freuen und ihr euch über ein Thx wa ? :D SYSERR: Aug 29 15:22:35 :: ChildLoop: AsyncSQL: query failed: Unknown column 'ip' in 'field list' (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 2, 28785, 0, 10001712, 'SET_SOCKET', '', '', 71124) errno: 1054) Mir ist aufgefallen dass der Coden in Rot der Code für Weißen Löwen ist....
ChildLoop: AsyncSQL: query failed: Unknown column
05/29/2012 - Metin2 Private Server - 0 Replies
Hallo, wie fixxt man diesen error der DB? SYSERR: May 29 08:13:03 :: GetMoveMotionSpeed: cannot find motion (name GnomMinotaurus race 2604 mode 0) SYSERR: May 29 08:13:19 :: GetMoveMotionSpeed: cannot find motion (name GnomMinotaurus race 2604 mode 0) SYSERR: May 29 08:13:32 :: SpawnMob: SpawnMob: no mob data for vnum 10800 SYSERR: May 29 08:13:33 :: GetMoveMotionSpeed: cannot find motion (name GnomMinotaurus race 2604 mode 0)
Guys ... why i cant modify any thing at cheat table ??
09/14/2011 - Kal Online - 5 Replies
i'm a new hacker i saw a video of CD i do every thing right till i add the address to the cheat table ...., when i try to change the value or the Description can any one tell me why ?
MSSQL Select column from table
03/19/2010 - Dekaron Private Server - 3 Replies
Hi , i have a little problem with mssql , cuz i wanted read out some columns to show in a table with php. My Question is how i can make a row of the dataset. I tried it but i see only the same in the table not the next entries of the column. here a part of the code: echo "<center><table border='1'><tr>



All times are GMT +2. The time now is 23:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.