Dear Rod
Thanks for that - and I think I can do it in one query. However, I need an outer join and the code isn't working
here it is:
"SELECT d.* FROM WYISORG AS d, WYISCONTACT AS d1 "
"LEFT OUTER JOIN d1 ON d.ORGID=d1.ORGID "
"WHERE "
(d1.SURNAME LIKE '%$searchphrase%')
OR (d.ORGANIZATIONNAME LIKE '%$searchphrase%')";
OR (d.BRIEF LIKE '%$searchphrase%')";
ORDER BY d.ORGANIZATIONNAME";
and this produces no records.
I hope I've got it right that even if nothing matches in WYISCONTACT it should still produce the records
Thanks again.