Jump to content

executeMySQL


Lloyd Logan

Recommended Posts

Hey,

I have been struggling for ages, and i can't quite get this to work :(

So I am looking to update the players rank when he logs in (dont ask why), the rank in located in Localhost db = newser

structure(<--- I think thats what its called) = account, then it is under the players name then admin, here is what i have so far?

newserv = dbConnect( "mysql", "dbname=newserv;host=127.0.0.1", "root", "" ) 
  
function makeadminn (thePlayer) 
        executeSQLQuery("UPDATE `account` SET `**dont know what to put here`=?, WHERE `admin`=2", thePlayer) 
end 
addCommandHandler("makemeadmin", makeadminn) 

Link to comment
dbExec ( connection, "UPDATE `accounts` SET `admin` = '2' WHERE `accountName` = 'Lloyd Logan" ) 

Thank you so much!!! Where you have put "Lloyd Logan" how would I replace that with whoever has logged in?

Like getPlayerName? Then how would I implement this into the script?

Thanks Again

Lloyd

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...