Is it possible to query a websql database using both AND and OR in the same statement?
This will not work:
tx.executeSql('SELECT * FROM people
WHERE name="'+name1+'" OR name="'+name2+'"
AND category=1', [], function (tx, results) {
Both these do:
tx.executeSql('SELECT * FROM people
WHERE name="'+name1+'" OR name="'+name2+'",
[], function (tx, results) {
tx.executeSql('SELECT * FROM people
WHERE name="'+name1+'"
AND category=1', [], function (tx, results) {
Is it not possible to achieve this or is my syntax / query incorrect?