Register for your free account! | Forgot your password?

You last visited: Today at 14:35

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

Advertisement



mysql_query("UPDATE

Discussion on mysql_query("UPDATE within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
mysql_query("UPDATE

Hallo

I Made A Quest To Change Plyer Name + Level So I Write Like That :
Code:
                mysql_query("UPDATE player.player SET name="..string.format("%q","[Test]"..pc.get_name()).." WHERE id = "..pc.get_player_id())
                mysql_query("UPDATE player.player SET level=1 WHERE id = "..pc.get_player_id())
But Not Work , Is There Any Thing Wrong ?
MrLibya is offline  
Old 10/03/2014, 22:56   #2

 
.yorliK's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 1,448
Received Thanks: 1,257
Do you give the database enough time to update? The player has to logout for some minutes.

Code:
mysql_query("UPDATE player.player SET name='[Test]"..pc.get_name()).."' WHERE id = '"..pc.get_player_id().."';")
mysql_query("UPDATE player.player SET level=1 WHERE id = '"..pc.get_player_id().."';")
.yorliK is offline  
Old 10/03/2014, 23:06   #3
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
I Know But see


When I Select Yes He Say Some Word Then Make Notice
But In The Game When I Select Yes He Just Close The Windos without any wrods , notice
+ nothing change in level or name , even if i logout
MrLibya is offline  
Old 10/03/2014, 23:09   #4

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,446
Code:
mysql_query("UPDATE player.player SET name='"..string.format("%s","[Test]"..pc.get_name()).."' WHERE id = "..pc.get_player_id())
Lord iRemix is offline  
Old 10/03/2014, 23:17   #5
 
Coniesan's Avatar
 
elite*gold: 1000
Join Date: Mar 2009
Posts: 1,408
Received Thanks: 1,006
U have to note, that the game is caching big data parts and syncs it every 8-10min with the database. So u'r methode don't work cause u have w8 (logged out) till the game is syncing.
Would use the "default" Quest for that:
Coniesan is offline  
Old 10/03/2014, 23:20   #6
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Quote:
Originally Posted by [iRemix] View Post
Code:
mysql_query("UPDATE player.player SET name='"..string.format("%s","[Test]"..pc.get_name()).."' WHERE id = "..pc.get_player_id())
Same
Quote:
Originally Posted by Coniesan View Post
U have to note, that the game is caching big data parts and syncs it every 8-10min with the database. So u'r methode don't work cause u have w8 (logged out) till the game is syncing.
Would use the "default" Quest for that:
Did You Read My Reply ?
MrLibya is offline  
Old 10/03/2014, 23:33   #7
 
Coniesan's Avatar
 
elite*gold: 1000
Join Date: Mar 2009
Posts: 1,408
Received Thanks: 1,006
Quote:
Originally Posted by MrLibya View Post
Did You Read My Reply ?
Honestly no.
So it's changing the name and level after relogg, but doesn't execute the say() functions?!
Does u'r syserr sais anything?
Coniesan is offline  
Old 10/04/2014, 00:16   #8
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Quote:
Originally Posted by Coniesan View Post
Honestly no.
So it's changing the name and level after relogg, but doesn't execute the say() functions?!
Does u'r syserr sais anything?
My Syserr Sleep
Just Kidding :
Code:
SYSERR: Sep 29 01:36:21 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 01:41:19 :: heart_idle: losing 182 seconds. (lag occured)
SYSERR: Sep 29 01:42:02 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 01:42:27 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 01:49:35 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 01:49:42 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 01:50:19 :: ChildLoop: AsyncSQL: query failed: Column count doesn't match value count at row 1 (query: INSERT DELAYED INTO money_log  VALUES (NOW(), 8, 27001, 78) errno: 1136)
SYSERR: Sep 29 01:50:19 :: ChildLoop: AsyncSQL: query failed: Column count doesn't match value count at row 1 (query: INSERT DELAYED INTO money_log  VALUES (NOW(), 8, 27002, 874) errno: 1136)
SYSERR: Sep 29 01:52:38 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 01:52:45 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 01:53:26 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 01:53:32 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 01:54:09 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 01:54:11 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 02:32:17 :: heart_idle: losing 111 seconds. (lag occured)
SYSERR: Sep 29 02:33:03 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 02:33:12 :: Select: wrong QUEST_SELECT request! : 57766
SYSERR: Sep 29 02:34:55 :: heart_idle: losing 38 seconds. (lag occured)
SYSERR: Sep 29 02:35:21 :: operator(): QUEST NOT END RUNNING on Login/Logout - PRO
SYSERR: Sep 29 02:35:42 :: Select: wrong QUEST_SELECT request! : 57766


UP
UP
MrLibya is offline  
Reply


Similar Threads Similar Threads
mysql_query("select
05/08/2014 - Metin2 Private Server - 9 Replies
Hallo That My First Time To Use Mysql In Quest So Litile Help PLz:) You See In The Quest : when login begin local title = mysql_query("select * from player.news where id = '"..l.."' ") local title_table = {}
"100CAP"New Update"New Life"All accepted that"VSRO Filles"500 SILKS free"Trade based
12/01/2012 - SRO PServer Advertising - 37 Replies
"As regards im here back to advertise all about new cap on AddictedSro"We are moving to cap 100" All users voted for that and ive do that JOB ! And lets start ! Server Name -AddictedSro Server News/COLOR] -We will upgrade pk2 tomorow 2 ! -We will improve new shop system ! Server Details -Cap: 100 -Skils: 100



All times are GMT +1. The time now is 14:36.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.