conditional statement based on terms

Use the Switch statement.

switch ($term->name) {
    case 'customtermincustomtaxonomy':
        // ...
        break;
    case 'anotherterm':
        // ...
        break;
    case 'somethingelse':
        // ...
        break;
}

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