boban88 Posted May 26, 2015 Share Posted May 26, 2015 hello i need help with my script. I have register via MySql but when i use /reg on server than server answer me login sucessfull but DB is empty. My line: mysql_query( database, "INSERT INTO accounts (log,pass,serial,name,points,money,wins,second,third,hunters,alevel,kills,score,playtime,deaths,matches,days,hours,minutes ) VALUES ('" .. username .. "','" .. password .. "', '" .. serial .. "', '" .. name .. "','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1' )" ) and i have this: database = mysql_connect( "localhost", "root", "pass", "db" ) if database then outputDebugString ('Connect') else outputDebugString ("Nothing") end and console answer me: Connect. I have not idea why this not working. Thanks for every answer. Link to comment
xXMADEXx Posted May 27, 2015 Share Posted May 27, 2015 You should use the MTA SQL functions. I'm not sure if mysql_query sends any errors, but in debugscript are there any errors or warnings? Link to comment
boban88 Posted May 27, 2015 Author Share Posted May 27, 2015 no 0 errors 0 warnings and i need mysql and before 1 year this script works perfect i dont know why now is broken... Link to comment
xXMADEXx Posted May 27, 2015 Share Posted May 27, 2015 no 0 errors 0 warnings and i need mysql and before 1 year this script works perfect i dont know why now is broken... Are you sure the accounts table exists in the database? If so, do all the columns match up? Try using dbConnect/dbExec, they have better debugging features than the MySQL modules does. Link to comment
boban88 Posted May 27, 2015 Author Share Posted May 27, 2015 here is DB 2 lines with name pass and log bul bul is tested via command INSERT but not from server. I create test.sql and import it to DB. EDIT: here is screen normal http://opatrovatelka-no.sk/images/here.png Link to comment
boban88 Posted May 27, 2015 Author Share Posted May 27, 2015 oh im idiot i fix it i have shuffled rows in command sry but thank you guy 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