Using PHP Code Snippets to query a database, $dbconnection->get_results is outputting nothing

Either you have a typo or your syntax is incorrect for this line:

$dbconnection = new $wpdb($username, $password, $dbname, $hostname );

It should be:

$dbconnection = new wpdb($username, $password, $dbname, $hostname ); (no $ in referencing the wpdb class)

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