Hi,
If you need to get the results from database, matching the beginning of user name, surname, name and surname, surname and name, middle name, you can use the solution below, based on SQL CONCAT(). You have to add some whitespace there to get the expected match.
SELECT id_user, user_name, user_surname FROM users
WHERE CONCAT(' ', user_name) LIKE '% " . $search_value . "%'
OR CONCAT(' ', user_surname) LIKE '% ". $search_value . "%'
OR CONCAT(user_name, ' ', user_surname) LIKE '" . $search_value . "%'
OR CONCAT(user_surname, ' ', user_name) LIKE '" . $search_value . "%';