Burridge Posted May 20, 2011 Posted May 20, 2011 Hey all, I have a few questions. I'm trying to work out how to save skins, money, and IPs into a MySQL database using the MySQL module. I'm still trying to get used to LUA, so it's slightly confusing to me. How would I go about doing this? Thank you for any help given.
Lavire Posted May 20, 2011 Posted May 20, 2011 Doing this with the MySQL module is actually quite easy: local host = "localhost" local user = "root" local pass = "123456" local db = "mta" local cmdstring = "INSERT INTO `accounts` (username, skin, money, ip) VALUES ('"..username.."', "..skin..", " ..money.. ", '" ..ipaddress .. "')" local result = mysql_query(connection, cmdstring) if(result) then --saving was successful end
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