Hm... I have no idea but the queries are usually seen as OR.
Maybe you should check out some sourcecodes of other clients to see how they solved the problem....
By the way Cakkie,
Were you the who voted for my Lynn Cache on PlanetSourceCode?
If you are that Cakkie, thanks!