This is the query for a gaming application to get a list of targets for the enemy that excludes locations that the enemy can’t see. This is a simplified version of my query to target my specific question.
SELECT * FROM `game_moblist` WHERE (posx!=0 AND posy!=0) AND (posx!=1100 AND posy!=220)
posx is the x coordinate posy is the y coordinate
I’m writing a loop to exclude any tiles that cannot be seen
The issue I see is that its treated as if the parenthesis aren’t there. All posx=1100 are excluded and not the ordered pair (1100,220) what is the proper syntax for what I’m trying to do? The only solution I thought of is to combine the two numbers into a unique single number but I’d rather learn something new.
I think you mean:
which can be rewritten also as: