Android Question SQL.ExecQuery2 question

parijs

Active Member
Licensed User
Longtime User
I want to sellect thinks from A,B,C,D,E but only if Z = "yes" in the db
So A also corresponded with what I look but because z = "no", I do not want it
I use the code below but it does not work.


Code: Copy
oRst = SQL.ExecQuery2("SELECT * FROM visit WHERE wijk = ? OR wijk = ? OR wijk = ? OR wijk = ? OR wijk = ? AND Z = ?", Array As String (A, B, C, D, E, "yes"))

;)
 
Or just place all your OR inside parenthesis leaving AND outside. But mahares code is better.
 
Upvote 0
Back
Top