How to get type of archive whether it is post or date or category archive?

Use just the functions, not the object properties:

if ( is_post_type_archive() or is_date() )

There are many conditional functions (returning TRUE or FALSE) for exactly these cases.

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