mysql 질문입니다

lamu의 이미지

result = mysql_store_result(conn);
int num_fields = mysql_num_fields(result);

while(row = mysql_fetch_row(result))
{
for(i = 0; i < num_fields; i++)
{
strcpy(n.name, row[0]);
n.age = atoi(row[1]);
n.sex = atoi(row[2]);
}
}

데이터베이스 자료를 다 못 뽑아오고 1줄만 뽑아오는데 어떻게 수정해야 하나요??

File attachments: 
첨부파일 크기
Plain text icon tcp_server_3.txt3.08 KB
bushi의 이미지

while (... mysql_fetch_row() ... ) {
...
}
send(...)