I got a question from a user. He has a table with a field (nom) containing first name and last name. When he uses db_search, asking, for example, for
marc delisle
and with the option "at least one of the words", nothing is found.
The generated query contains:
WHERE (`nom` LIKE 'marc') OR (`nom` LIKE 'delisle')
Of course, if he puts wildcards in the search expression, it works, but it seems not intuitive. It also works with search option 4 (regexp).
Shouldn't we add wildcards in db_search for word by word search, so that the generated query had this condition:
WHERE (`nom` LIKE '%marc%') OR (`nom` LIKE '%delisle%')
Marc
On Mon, Nov 18, 2002 at 03:10:13PM -0500, Marc Delisle wrote:
and with the option "at least one of the words", nothing is found.
The generated query contains:
WHERE (`nom` LIKE 'marc') OR (`nom` LIKE 'delisle')
Of course, if he puts wildcards in the search expression, it works, but it seems not intuitive. It also works with search option 4 (regexp).
Shouldn't we add wildcards in db_search for word by word search, so that the generated query had this condition:
WHERE (`nom` LIKE '%marc%') OR (`nom` LIKE '%delisle%')
Yes. I think this is a bug that got introduced by somebody along the way, as it used to put in the wildcards. So we should put them back now.