laserlaser Posted November 20, 2010 Share Posted November 20, 2010 (edited) Hello,this my new function.Easy but good ! Example use: local handler = mysql_connect(...) mysqlUpdateParam(handler,"users","money",getPlayerMoney(source),"userid",1) mysqlUpdateParam ( mysqlHandler handler,string tablename,string rowname,string/int/float/double/bool rowvalue,string idrow,string id) The Function : function mysqlUpdateParam(handler,tablename,paramname,paramvalue,idrow,id) if handler and paramname and paramvalue then local query = mysql_query(handler,"UPDATE "..tablename.." SET "..paramname.."='"..tostring(paramvalue).."' WHERE "..idrow.."="..id) if query then return true else return false end end end Note : I did not test. Bug may be. Tell me if you find the bug. War OF Empire LUA Team Edited November 21, 2010 by Guest Link to comment
Aibo Posted November 21, 2010 Share Posted November 21, 2010 you forgot to close the parentheses Link to comment
laserlaser Posted November 21, 2010 Author Share Posted November 21, 2010 you forgot to close the parentheses lol Thank you for error.I fix it Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now