Hook directly into query execution

In the class WP_Query, there is a hook posts_pre_query wich allow to set the result of a query before the DB call

https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/class-wp-query.php#L2755

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