custom search results affected by _REQUEST set

A colleague of mine gave me this helpful answer, I hope it helps others:

“To answer definitively, I would need to see a bit more code. Nonetheless, WordPress does override $_REQUEST, so depending on where this code is placed, it may be overwritten. So assuming that the parameter is being passed in the URL, I would try:

if( !isset($_GET['sorting'])) { $_GET['sorting'] = "views"; } 

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