Substituting value via shortcode

If you put variables inside a string, you have to use " double quotes.

So:

// This:
$qstr="
SELECT *
...
ORDER BY $wpdb->posts.post_date DESC
";

// becomes...
$qstr = "
SELECT *
...
ORDER BY $wpdb->posts.post_date DESC
";

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