#SQL table not being selected properly?

1 messages · Page 1 of 1 (latest)

smoky edgeBOT
#

<@&987246399047479336> please have a look, thanks.

spice charm
#

Your second query on getUserPerms is retrieving all users with userIsRoot = 0

Why are you doing two queries instead of one on getUserPerms?
You could probably do something like "select * from users where userUid = ? AND userIsRoot = 1"
If that returns anything you know he has permissions

#

Another way would be to just get the user normally into a user object and check if it has userIsRoot == 1/true

willow helm
#

Oh I have never thought about getting one query instead of 2….

#

Thanks I’ll try it

willow helm
#

Worked, thanks g