Hi

 

Using MySql V4.x

 

If I use this 

 

SELECT * FROM marriage  WHERE  groom_surname like  ('"& globsurname & "')
and community like ('"& community & "')

 

 

I get the results I expect

 

And if I use this it also works fine

 

 

SELECT * FROM marriage  WHERE  bride_surname like  ('"& globsurname & "')
and community like ('"& community & "')

 

 

However if I use

 

SELECT * FROM marriage  WHERE  groom_surname like  ('"& globsurname & "') or
bride_surname like  ('"& globsurname & "') and community like ('"& community
& "')

 

 

Its like the AND is being ignored when I add the OR

 

I my basic logic flawed?

 

Regards

 

John Berman

[EMAIL PROTECTED]

Reply via email to