TrickyTommy Posted September 9, 2017 Share Posted September 9, 2017 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
Dimos7 Posted September 9, 2017 Share Posted September 9, 2017 (edited) 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) Edited September 9, 2017 by Dimos7 Link to comment
TrickyTommy Posted September 18, 2017 Author Share Posted September 18, 2017 sorry, but i don't understand it yet. Link to comment
Dimos7 Posted September 18, 2017 Share Posted September 18, 2017 that functions is all you need for mysql if you want to inters something to table you use dbExec and when you want to take something from it or will use dbExec or dbQuery and table for make something strin you need the function tostring that it Link to comment
Anubhav Posted September 19, 2017 Share Posted September 19, 2017 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
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