Good morning everyone .. I'm doing a project in Laravel 5.5 and I have a question with a query to my database ...
I have a table called CUTTER (the name does not matter much) that assigns a code depending on the similarity of a person's last name, the data of my table is stored in this way:
cod_cutter is the code that must be assigned depending on the last name, and nom_cutter is the similarity that the last name must have ...
Now what I'm trying to do is: if a surname example: Montemayor , look in the database and assign the default code in this case: 777 (according to the database).
I tried to use the LIKE query but as the last name entered is complete (Montemayor) and in the database I have only one similar indicator (Montem) , I get 0 results . And I need the code to be automatically assigned depending on the closest similarity of the surname entered by the user.
Any solution to work on LARAVEL5.5 or simply on MYSQL ?? Your answers are very much appreciated ...