Can’t get expected result from a wpdb query

I know I probably can’t see the full picture, but in the excerpt you provided isn’t globalizing $post.

global $wpdb, $post;
$short = $wpdb->get_var("SELECT url FROM $wpdb->prefix.'tweet_url' WHERE post_id = '$post->ID' ");

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