Jump to content

Need SQL help


seal

Recommended Posts

Hi, im new in lua programming and need some help in executesql using.

Ok, i can create tables and rows but i cant put in values, so how can i put values into the database?

E.G: playerposition, charactername.

And when an account is already in the table how can is update its data?

Thank you for your answers :)

Link to comment
addEventHandler("onPlayerJoin", getRootElement(), 
function () 
zombie_db = connectToDB() 
x, y, z = getElementPosition(source) 
dbExec( zombie_db, "INSERT INTO characters (nume, model, health, posx, posy, posz) VALUES (?,?,?,?,?,?)", getPlayerName(source), getElementModel(source), getElementHealth(source), x, y, z ) 
end) 

take an example

Edited by Guest
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...