Replace an URL with an new URL which has a “?” in it

If you are appending any parameters to the url you should use add_query_args https://developer.wordpress.org/reference/functions/add_query_arg/

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