Jump to content

Recommended Posts

  • Premium
mysql: ambiguous option '--e=SELECT coins from account.account WHERE id=3 LIMIT 1;' (enable_cleartext_plugin, execute) 

How i can resolve it? I have a quest that require mysql_query:

quest mds begin
    state start begin
        when login begin
            loop_timer("carga_mds", 10)
        end
     
        when carga_mds.timer begin
            local coins = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
            cmdchat("Mds "..coins)
        end
    end
end

My mysql_query of questlib.lua:

mysql_query = function(query) 
    local rt = io.open('CONFIG','r'):read('*all') 
    local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4') 
    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, 
        out[i-1]        = out[i-1] or {} 
        out[i-1][a]        = b 
        out[t[1][a]]    = out[t[1][a]] or {} 
        out[t[1][a]][i-1]    = b 
    end) end 
    return out 
end
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.