$wpdb->get_results not returning an array

It has nothing to do with $wpdb. It’s PHP parse error.

print_r is a function, so you can’t do print_r $datarow;
You should use print_r( $datarow ); instead.

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