I want to edit the search function

Basically everything query-related is in wp-includes/query.php. Search for the parse_search function in that file and the posts_search and posts_search_orderby filters.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)