I'm building a search system using Mysql and PHP, with a form in the _GET method.
I wanted to put together a system that if the person types the wrong one, the site can "correct" the word, or suggest the correct word.
The only way I thought it was to have type a relationship table, eg:
tabela_relacoes
termo|variacao
maçã | macan
maçã |amaçã
Is there any better way to do this?
My search is currently like this:
SELECT *
FROM cadastros
WHERE titulo LIKE '%termo%'
where term is provided by the variable $ _GET ['term'] in the search in php