.:HyPeX:. Posted May 20, 2015 Posted May 20, 2015 Hello, i was wondering how does the default race_toptimes save the toptimes? i readed it over many times but i couldnt quite understand the "file" saving. My issue comes to the point i did my own Mysql toptimes but i wanted to retrive the old toptimes and inject them in my SQL table. So far i save them in tables under "["..md5(mapname).."]". Greets HyPeX My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
novo Posted May 21, 2015 Posted May 21, 2015 As seen at databasetable_server.lua, function SDatabaseTable:tryLoad() ( ... ) local cmd -- SELECT -- Build command cmd = 'SELECT * FROM ' .. qsafetablename( self.name ) local sqlResults = executeSQLQuery( cmd ) ( ... ) end in order to transfer and utilize sqlite-stored toptimes with your new system, you'll simply need to gather these's info and insert them into your mysql database. function safestring( s ) -- escape ' return s:gsub( "(['])", "''" ) end function qsafestring( s ) -- ensure is wrapped in ' return "'" .. safestring(s) .. "'" end function qsafetablename( s ) return qsafestring(s) end
.:HyPeX:. Posted May 21, 2015 Author Posted May 21, 2015 This was my SQL injection on map start: "CREATE TABLE IF NOT EXISTS `["..md5(name).."]` ( mapname varchar(255),serial varchar(255), name varchar(255), time int, country varchar(255), date int);" I dont have that much of an issue to just load the SQL data and take it out; but where is the SQL connection definition, to wich SQL it connects? I already had found those lines, but the SQL Query does not specify to where it connects.. Greetz. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
ALw7sH Posted May 21, 2015 Posted May 21, 2015 There's no database argument on executeSQLQuery function
.:HyPeX:. Posted May 21, 2015 Author Posted May 21, 2015 Did i say there was? I couldnt find Anywhere the database connection or location, i need that to make my porting.. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
.:HyPeX:. Posted May 27, 2015 Author Posted May 27, 2015 Bump, anyone? My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
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