Jump to content

Getting, and inserting data to MySQL!


TrickyTommy

Recommended Posts

Hey friends, i want to make an authentication system. But i am not good at SQL and i have no clue where to start, thats why i would like to ask you for an example script with comments. 
Current DB name: mta_test, Current table name: users
I use root.

Basicly i need a command that inserts a string into mysql, and another command that checks if there is anything like the given string.

Link to comment
  • 2 weeks later...
On 9/10/2017 at 00:54, Dimos7 said:

local conenct = dbConnect("MYSQL", "dbname=mta_test;host=127.0.0.1", "root")
local query = dbExec(connect, "INSERT INTO users") or dbQuery(connect, "SELECT * FROM  users")
tostring 
local result = dbPoll(query, 500)

 

Very hard to give proper answers isn't it?

Lol. The syntax for INSERT is incomplete and wrong because it is incomplete.

And by the way you do not poll dxExecs.....

 

Anyways, there is a good tutorial on this. 

Go there and check the first post with db functions.  

 

 

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