quotes problem in very simple sql

if you’re communicating with the WordPress database itself, try using $wpdb->prepare() on your select string before running it as $wpdb->query() – it should format it for you.

Further reading: Codex

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