Can I use wpdb to insert query results into a post?

$wpdb is a relatively simple wrapper around PHP’s mysql functions. If you can do it with PHP/SQL then you can do it with $wpdb.

You’re question is not detailed or specific enough to afford a more detailed answer though. Nor is it detailed enough to say whether $wpdb is the best, or even an acceptable` way to do what you are trying to do.

Edit the question and I will edit the answer.

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