I have tested a SQL query within phpmyadmin and can get it to work as I need. basically I have a text field where someone can enter a doctors name i.e. Dr Dawson.... the field this is pulled from is called Doctors, so the query looks like:
SELECT * FROM `maindata` WHERE Doctors LIKE "dr %dawson%"
Open in new window