Display custom fields only if it has a value

You can use isset() function to check if it has a value.

In your case you can do like this :

    $width = get_post_meta( $post->ID, 'iswidth', true );
    if( isset( $width ) ){
      echo "<li>Width (px): ".$width."</li>";
    }

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