[Problem]Who is good with SQL ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Problem]Who is good with SQL ? (
/showthread.php?tid=108494)
[Problem]Who is good with SQL ? -
Woka - 14.11.2009
Hi
I'm using G-sTyLeZzZ plugin (MySQL Plugin R2)
There is no function to update a field in SQL server.
So how can i update a value ?
Of course don't suggest using SQL programming such as (
Update <Table> SET <Field> = <Value> WHERE <Condition>) because i have to update much data in period of time 30 sec and it make server laggy.
What should i do !?
Re: [Problem]Who is good with SQL ? -
Woka - 15.11.2009
Bump!!!
Re: [Problem]Who is good with SQL ? -
darkrider366 - 15.11.2009
Try using the MODIFY command. I think..., or just use insert, or delete then insert..
Re: [Problem]Who is good with SQL ? -
Woka - 15.11.2009
Quote:
Originally Posted by darkrider366
Try using the MODIFY command. I think..., or just use insert, or delete then insert..
|
If i do delete and insert then it will be more laggy because i send 2 command.
anyway what is MODIFY ?
Re: [Problem]Who is good with SQL ? -
Woet - 15.11.2009
Nothing is wrong with UPDATE, it's the only and fastest way.
You can set multiple fields though: UPDATE table SET foo = 'bar', bar = 'foo' WHERE 1 = 1
Re: [Problem]Who is good with SQL ? -
Daren_Jacobson - 15.11.2009
mysql_query("UPDATE `table` SET (`name` = 'Bob', `key` = md5('lolcatkingtheownerofalltheworld')) WHERE `id` = 1
if he made a function it would be even slower.