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)))
{
//printf("198\n");
for(int i = 0; i < num_fields; i++)
{
//printf("----------\n");
printf("%25s ",row[i]);
if(row[i] == NULL)
{
printf("No values exist\n");
}
//printf("----------\n");
//printf("%s ", row[i] ? row[i] : "NULL");
}
printf("\n");
}
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