Hi All

I am not too sure why I can't get this to work, I'm sure it is an easy fix but just can't get it.

My SQL is:

SELECT * FROM webuseraccounts WHERE type='t' OR type='ft' AND siteid='$accountname' AND active='y' AND companyname LIKE '$letter%' ORDER BY companyname asc

If I remove the OR part it works but does not pull in all the information I need. With the OR statement in it is pulling in 4 entries that it shouldn't be.

Any suggestions on what might be wrong with this code would be great.