Jockie Posted October 10, 2010 Posted October 10, 2010 I'm currently stuck with a tiny problem, I want to save every race map name into the database with accountname+stats. But the thing is, it does nothing. No errors in the debugscript, no overheaded data at database. fullname = "test" -- fullname is the name of the map(from a map table) --MySQL > Connection to the database, that works. ;D mysql_query( MySQL, "CREATE TABLE '<databasename>."..fullname.."' ( id INT( 11 ) NOT NULL , name VARCHAR( 255 ) NOT NULL , latest VARCHAR( 255 ) NOT NULL , played VARCHAR( 255 ) NOT NULL , won VARCHAR( 255 ) NOT NULL , latest1 VARCHAR( 255 ) NOT NULL , played1 VARCHAR( 255 ) NOT NULL , won1 VARCHAR( 255 ) NOT NULL , latest2 VARCHAR( 255 ) NOT NULL , played2 VARCHAR( 255 ) NOT NULL , won2 VARCHAR( 255 ) NOT NULL )") mysql_query( MySQL, "ALTER TABLE "..fullname.." ADD PRIMARY KEY ( id )") mysql_query( MySQL, "ALTER TABLE "..fullname.." CHANGE id id INT( 11 ) NOT NULL AUTO_INCREMENT ")
dzek (varez) Posted October 10, 2010 Posted October 10, 2010 check what first mysql_query is returning. I don't remember how to get error of query in mta but the query is invalid. also you should create table once, so CREATE TABLE IF NOT EXISTS will be better. I suggest you to get back to mysql manual. your table logic isn't good one to. columns like "won" should be int i think. summary: read manual, re-think that again and rewrite from scratch Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Jockie Posted October 11, 2010 Author Posted October 11, 2010 I found the problems, those are the "[", "]", "" and "-" in the name. Like [DM] Pr0nOoB - Summer Beach So how to make is saveable and that the "[", "]", "" and "-" will save?
dzek (varez) Posted October 11, 2010 Posted October 11, 2010 i dont understand. first thing that is incorrect is this: "." - you can simply remove it Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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