Jump to content

Need Help at my Script!


gokalpfirat

Recommended Posts

handler = mysql_connect("localhost", "root", "ankara", "mtaturk") -- Establish the connection 
if ( not handler ) then -- The connection failed 
  outputDebugString("Unable to connect to the MySQL server") 
else 
  outputDebugString("Connected") 
end 
  
function kayit(player,cmd,name1,pass) 
name1 = tostring(name1) 
c1 = mysql_query(handler, "SELECT Name FROM users WHERE Name='"..name1.."'") 
if (c1 == true) then 
outputDebugString("Name already exist") 
else 
outputDebugString("You can create an acc") 
reg = mysql_query(handler, "INSERT INTO users(Name,Pass,Para,Puan) VALUES('"..name1.."', '"..pass.."', 0, 0 ") 
end 
mysql_free_result(c1) 
end 
addCommandHandler("kayit",kayit) 

This is my script I connect my mysql but when I "kayit" command I cant add accound.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...