R1Z Posted April 5, 2020 Share Posted April 5, 2020 (edited) Hi guys, i try to get a result back from my mysql database (im just testing). Basically what i want is "If value == 1 then give weapon" else "No access" But i wont get a right answer. I tried google before i came here but i dont know if im googling something wrong or am just stupid. My code (its just a try!): https://github.com/R1ZAHHHH/Test/blob/master/test Im using mrpancakers mysql login. (Awesome stuff buddy!) And yes the value "gunA" is in the table of the mysql database. Edited April 5, 2020 by R1Z Link to comment Share on other sites More sharing options...
MrPancakers Posted April 5, 2020 Share Posted April 5, 2020 You wrote it correct in this thread but in your script you did something else? Why did you write "res => 1" But in this thread you wrote "value == 1" which is correct Link to comment Share on other sites More sharing options...
R1Z Posted April 6, 2020 Author Share Posted April 6, 2020 8 hours ago, MrPancakers said: You wrote it correct in this thread but in your script you did something else? Why did you write "res => 1" But in this thread you wrote "value == 1" which is correct Oh damn didnt notice that sorry. But still it wont do anything. After i typed the command it just does nothing no error, no gun nothing in the console. If i remove the "Throw err" it says no access. Link to comment Share on other sites More sharing options...
MrPancakers Posted April 6, 2020 Share Posted April 6, 2020 3 hours ago, R1Z said: Oh damn didnt notice that sorry. But still it wont do anything. After i typed the command it just does nothing no error, no gun nothing in the console. If i remove the "Throw err" it says no access. Go and do console.log(`Res: ${res}`) inside your connect method and you'll see why. Link to comment Share on other sites More sharing options...
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