get the permalink never return with empty value

You just need to check if $customID is set, first. E.g.

if ($customID && get_permalink ($customID)) {
    echo 'true';
} else {
    echo 'false';
}

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