Having some problems trying to get my query to work.
I have a query where it select the first character of the company feild, but if there is no company it then selects the first character of the surname. I was wondering how to go about it. Below is a snippet of what i currently have.
SELECT * FROM contacts WHERE left(company,1)='$letter'
How do i do it if compnay is null so then search in surname.