how to get term id from current post type instead of name

get_the_terms()
will help you. Function return array with terms objects and you can foreach array and retrieve term id for each term attached to post.

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