Register for your free account! | Forgot your password?

Go Back   elitepvpers › Popular Games › Metin2 › Metin2 Private Server
You last visited: Today at 22:06

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

Advertisement



MYSQL Query. Hilfe wäre cool ...

Discussion on MYSQL Query. Hilfe wäre cool ... within the Metin2 Private Server forum part of the Metin2 category.

Closed Thread
 
Old   #1
 
αѕ¢σявιη's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 91
Received Thanks: 30
MYSQL Query. Hilfe wäre cool ...

Guten Tag, liebe epvp Community. ich scheitere grad ein wenig an einem MYSQL Query
Also, der Query sollte wie folgt aussehen.
aus der tabelle entschaedigung.player soll das feld "playtime" jedes Chars, der auf dem Account existiert zusammengerechnet werden und in die account.account tabelle (feld "entschaedigung") eingetragen werden
Die Account-ID ist in der entschaedigung.player als "account_id" angegeben
wäre cool, wenn jemand einen solchen query erstellen könnte

mfg Ascorbin
αѕ¢σявιη is offline  
Old   #2
 
elite*gold: 11
Join Date: Nov 2010
Posts: 1,709
Received Thanks: 3,828
UPDATE account.account a INNER JOIN (SELECT account_id,sum(playtime) FROM player.player GROUP BY account_id) p ON a.id = p.account_id;

You need to have a playtime field in account table of course.
.Shōgun is offline  
Old   #3
 
Red Firestar's Avatar
 
elite*gold: 0
The Black Market: 185/0/0
Join Date: Jul 2012
Posts: 5,520
Received Thanks: 1,349
Wenn du immer noch Probleme hast kannst du mein Service benutzen.
Red Firestar is offline  
Old   #4
 
αѕ¢σявιη's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 91
Received Thanks: 30
Quote:
Originally Posted by Uncorrupted View Post
UPDATE account.account a INNER JOIN (SELECT account_id,sum(playtime) FROM player.player GROUP BY account_id) p ON a.id = p.account_id;

You need to have a playtime field in account table of course.
doesn't work. but thanks for that
i've got the following error:
[SQL] UPDATE account.account a INNER JOIN (SELECT account_id,sum(playtime) FROM player.player GROUP BY account_id) p ON a.id = p.account_id;
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
αѕ¢σявιη is offline  
Old   #5
 
xSpongBoZZ's Avatar
 
elite*gold: 0
Join Date: Sep 2013
Posts: 108
Received Thanks: 124
Quote:
Originally Posted by αѕ¢σявιη View Post
doesn't work. but thanks for that
i've got the following error:
[SQL] UPDATE account.account a INNER JOIN (SELECT account_id,sum(playtime) FROM player.player GROUP BY account_id) p ON a.id = p.account_id;
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Gib in Putty Den befehl Ein: chmod -R 777 /var/db/mysql
Und dann Reboot
xSpongBoZZ is offline  
Old   #6


 
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
Code:
UPDATE account.account INNER JOIN (SELECT sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
So sollte es gehen.

Quote:
Originally Posted by xSpongBoZZ View Post
Gib in Putty Den befehl Ein: chmod -R 777 /var/db/mysql
Und dann Reboot
"[Err] 1064 - You have an error in your SQL syntax;" - Das hat nichts mit den Rechten zutun.
#SoNiice is offline  
Thanks
2 Users
Old   #7
 
αѕ¢σявιη's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 91
Received Thanks: 30
Quote:
Originally Posted by Hühnchenkopf View Post
Code:
UPDATE account.account INNER JOIN (SELECT sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
So sollte es gehen.



"[Err] 1064 - You have an error in your SQL syntax;" - Das hat nichts mit den Rechten zutun.
Danke für den Query. jetzt werd ich Vegetarier um deine Spezies nicht zu Gefährden ne spaß.
Aber das ganze will noch nicht so ganz:
[SQL] UPDATE account.account INNER JOIN (SELECT sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
[Err] 1054 - Unknown column 'p.account_id' in 'on clause'

mfg
Asco
αѕ¢σявιη is offline  
Old   #8


 
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
Code:
UPDATE account.account INNER JOIN (SELECT account_id, sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
So, nun aber.
#SoNiice is offline  
Old   #9
 
αѕ¢σявιη's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 91
Received Thanks: 30
Quote:
Originally Posted by Hühnchenkopf View Post
Code:
UPDATE account.account INNER JOIN (SELECT account_id, sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
So, nun aber.
[SQL] UPDATE account.account INNER JOIN (SELECT account_id, sum(playtime) AS summe FROM entschaedigung.player) p ON p.account_id = account.account.id SET account.account.playtime = summe;
Affected rows: 0
Time: 0.085ms



komisch ... kein row betroffen
Keine Ahnung an was das liegt
Die Felder hab ich schon gecheckt. sind vorhanden
αѕ¢σявιη is offline  
Old   #10
 
αѕ¢σявιη's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 91
Received Thanks: 30
push
αѕ¢σявιη is offline  
Old   #11


 
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
Hatte es ihm nun in einem total umständlichen PHP Script gemacht, clsrqst.
#SoNiice is offline  
Closed Thread


Similar Threads Similar Threads
PHP-Mysql _ query
06/08/2012 - Web Development - 0 Replies
Hallo meine frage/problem wie kriege ich es hin das diese anfragen mit einem query abgesendet werden? $eintrag = "INSERT INTO lions_aateilnahme (Event,Freund,Personen,EssenFleisch, EssenFisch,EssenVeg,Kommen,Bemerkung) VALUES ('$id','$name', '$teilnehmer','$norm', '$fisch','$veg','$kommen','$bemerkung')"; $eintragen = mysql_query($eintrag); if(!empty($int)){ $intt= "INSERT INTO lions_aateilnahme (IntAntwort1) VALUES('$int')"; $eintragen = mysql_query($intt);
PHP/MySQL Help - Is this MySQL Query correct?
09/23/2011 - CO2 Programming - 1 Replies
$rank = mysql_query("SELECT Name,Level,Class,Online FROM entities ORDER BY Level DESC LIMIT $limit"); I'm pretty sure that is right... whenever I do while ($row = mysql_fetch_array($rank)) { ... } It always gives me a mysql_fetch_array error. I've checked and the database is populated, the columns exist, so what could be the issue?
Paar Fragen, wäre cool wen ihr helft=)
08/27/2010 - Alliance of Valiant Arms - 4 Replies
Hey, Also, ich lad mir gerade das spiel runter, weils sehr interessant aussah :D jetzt würd ich gerne wissen wie das game so ist... Waffen, sind die genau? auch im laufen und springen ? oder so wie combat arms? wenn ich mir eine hole bleibt die forever? sind wafffen teuer?



All times are GMT +1. The time now is 22:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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