PHP Syntax getting PHP terms

I prefer to use get_the_ID() for things like that, which will return the ID of the current page/post.

$mjrelatedproducts = get_brands( get_the_ID() )->slug;

That should return the slug of the current page/post.

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