Jump to content

Mysql no result


R1Z

Recommended Posts

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 by R1Z
Link to comment
Share on other sites

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

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

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