How do I use get_query_var() within plguin code

get_query_var works within any code, theme or plugin. But it will only return meaningful data after the query has been processed. So, use it on the init hook or later.

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