Geting error in post and category [closed]

$cat = $cat[0]->cat_ID;

of course if $cat is not empty

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