Hi,
I've a very basic search feature built into a site that simply searches the names held in a specific table. I am using the following SELECT command where $search is the query passed over from the input box:
SELECT * FROM biografias WHERE tipo = 1 AND nombre LIKE '%$search%'"
This works reasonably well apart from one flaw. If I search for calder (surname) I get a return, if I search for alexander (first name) I get a return, but if I search for the complete name alexander calder I get no returns.
In the small DB provided the artist names are entered into a single field and in reverse, eg. Calder, Alexander and I assume that it is this that is causing the problem when I search for the name in it's natural order (a search on calder, alexander gives a result).
My needs here are quite basic, but clearly allowing the user to enter the name in natural order is a must. Can anyone suggest a workaround that can make the DB recognise / select the name without changing the actual DB entry?
Thanks in advance,
Gary Crighton