get_var is neither a string, integer, or array …?

var_dump($vote_count) should tell you what type $vote_count is. Probably you’re getting NULL.

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