Figure out the problem. Their is a mistake in the plugin code file.
Please replace this line of code tng_select_db($database_name, $link)
with the one below
tng_select_db($link,$database_name)
on line number 2258
if( $link && tng_select_db($database_name, $link))
in the plugin file tng.php.