I am trying to print my data in columns. For some reason every column but the last one lines up. Is there a way to fix this?

while ((row = mysql_fetch_row(result))) 
    for(int i = 0; i < num_fields; i++) 
        printf("%25s         ",row[i]);
        if(row[i] == NULL)
            printf("No values exist\n");
        //printf("%s      ", row[i] ? row[i] : "NULL"); 

My Output:

             Sang Hun Lee                             VINES                                KR
            Jung Hyun Lim                             Crazy                                KR
           Tom Brekelmans                              PoYo                                NL
            Shin Jung Min                         Superstar                                KR
         Lacroix Corentin                           Makouni                                BE
           Beak Seung-Joo                   ButterflyEffect                                KR
           Choi Joon Hyuk                                xD                                KR
            Kwun Jung Woo                              Fake                                KR
       Kalle Pietiläinen                          Prospect                                SE

You are set 25 symbols (+9 white space) width for each column - maybe output window is not so large

Also you should consider to start using mysqli*


Just a guess...

Is it possible that you are using a one byte character set where the a-umlaut is a 2-byte extended code? (easy to check - just replace it with an ordinary a and see what happens)