|
You last visited: Today at 19:11
Advertisement
Mysql Query Ambigous Option - HELP !
Discussion on Mysql Query Ambigous Option - HELP ! within the Metin2 Private Server forum part of the Metin2 category.
01/02/2013, 05:39
|
#1
|
elite*gold: 2
Join Date: Nov 2008
Posts: 628
Received Thanks: 1,633
|
Mysql Query Ambigous Option - HELP !
Guten morgen Epvp.
Ich bin grade dabei ein eigenes PvP-Ranking zu erstellen.
Die PHP dafür hab ich bereits funtionstüchtig fertig.
Jedoch funzt meine mysql funktion nicht richtig...
Code:
local spielerid= pc.get_player_id()
local update_kill_rot = mysql_query("UPDATE player.player SET red_kill="..pc.getqf("empire1").." WHERE id="..spielerid.."")
Code:
mysql: ambiguous option '--e=UPDATE player.player SET red_kill=6 WHERE id=57976' (enable_cleartext_plugin, execute)
ID und Killanzahl liest er wunderbar aus.
Nur setzt er die spalte dort nicht auf 6 wie es im Befehl steht.
Bitte um Hilfe !
Also bitte um Hilfe !
|
|
|
01/02/2013, 09:39
|
#2
|
elite*gold: 258
Join Date: Feb 2011
Posts: 1,405
Received Thanks: 3,502
|
Zeig mir mal deine mysql_query function. Ich glaube ich kenne den Fehler.
|
|
|
01/02/2013, 12:15
|
#3
|
elite*gold: 2
Join Date: Nov 2008
Posts: 628
Received Thanks: 1,633
|
Quote:
Originally Posted by iSouli~
Zeig mir mal deine mysql_query function. Ich glaube ich kenne den Fehler.
|
Code:
--[[
@name mysql_query
@author Mijago
@needs split
@descr
Mysql-Funktion der neuesten Generation.
--]]
mysql_query = function(query)
if not pre then
local rt = io.open('CONFIG','r'):read('*all')
pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
end
math.randomseed(os.time())
local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
for i = 2, table.getn(t) do table.foreach(t[i],function(a,b)
out[i-1] = out[i-1] or {}
out[i-1][a] = tonumber(b) or b or 'NULL'
out[t[1][a]] = out[t[1][a]] or {}
out[t[1][a]][i-1] = tonumber(b) or b or 'NULL'
end) end
out.__lines = t[1]
return out
end
Ganz normale von Mijago halt
|
|
|
01/02/2013, 18:18
|
#4
|
elite*gold: 258
Join Date: Feb 2011
Posts: 1,405
Received Thanks: 3,502
|
Quote:
Originally Posted by xSanii
Code:
--[[
@name mysql_query
@author Mijago
@needs split
@descr
Mysql-Funktion der neuesten Generation.
--]]
mysql_query = function(query)
if not pre then
local rt = io.open('CONFIG','r'):read('*all')
pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
end
math.randomseed(os.time())
local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
for i = 2, table.getn(t) do table.foreach(t[i],function(a,b)
out[i-1] = out[i-1] or {}
out[i-1][a] = tonumber(b) or b or 'NULL'
out[t[1][a]] = out[t[1][a]] or {}
out[t[1][a]][i-1] = tonumber(b) or b or 'NULL'
end) end
out.__lines = t[1]
return out
end
Ganz normale von Mijago halt 
|
Änder das --e=" in -e" dann sollte es wieder funktionieren.
|
|
|
01/03/2013, 12:24
|
#5
|
elite*gold: 2
Join Date: Nov 2008
Posts: 628
Received Thanks: 1,633
|
Kann closed werden.
SoNiice hat mir bereits geholfen
|
|
|
 |
Similar Threads
|
Mysql Query.
10/20/2012 - Metin2 Private Server - 0 Replies
Hey Com.
Ich suche eine Mysql Query die bestimmte Eiinträge aus der quest.sql löscht.
MfG
|
Mysql Query.
10/12/2012 - Metin2 Private Server - 7 Replies
Hey Com.
Ich suche eine query die alle Einträge: costume_system sucht und löscht aus meiner quest.sql
|
MySQL Query
10/10/2012 - Metin2 Private Server - 2 Replies
Hey COM.
Ich suche eine Query die die Coins von einem Account auf 5000 setzt.
Ein andere User hat auch danach gefragt, aber keine Antwort bekommen
|
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?
|
All times are GMT +1. The time now is 19:11.
|
|