To amend SQL to check for login, password and access (2 conditions)

Hi,

Currently working SQL to check for login and password:

function () {

return “SELECT * FROM data WHERE “login” = '”+document.childByName(“TextField_userLogin”).content.text+"’ AND “password” = ‘"+document.childByName(“TextField_userPassword”).content.text+"’ LIMIT 0, -1"

}

New working SQL to check for login, password and access (1 condition, access =1):

function () {

return “SELECT * FROM data WHERE “login” = '”+document.childByName(“TextField_userLogin”).content.text+"’ AND “password” = ‘"+document.childByName(“TextField_userPassword”).content.text+"’ AND “access” = 1 LIMIT 0, -1"

}

Question:

How to amend SQL to check for login, password and access (2 conditions, (access=1 or access = 3))?

Appreciate your help. Thank you!

Replace "access" = 1 with ("access" = 1 OR "access" = 3)

SELECT * FROM data WHERE "login" = '"+document.childByName("TextField_userLogin").content.text+"' AND "password" = '"+document.childByName("TextField_userPassword").content.text+"' AND ("access" = 1 OR "access" = 3) LIMIT 0, -1

Hi,

We’ve changed to syntax to the below but still fail. Please help. Thank you.
flipabit

Could you send your project file to [email protected].


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.