Get newest created custom category (get_term_by and variables) (outside Loop)

You can use this function http://codex.wordpress.org/Function_Reference/get_categories

The parameters passed are basically the same except it returns an object containing all the category information. Using this function can replace the first 4 lines of your code. Now your final code becomes:

$getID = get_categories('taxonomy=issue&number=1&orderby=ID&order=DESC');
$currentID = $getID->term_id;

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