res=mysql_store_result (& amp; Mysql);
If (res==NULL)
{
Printf (" mysql_restore_result () : % s \ n ", mysql_error (& amp; Mysql));
break;
}
Rows=mysql_num_rows (res);
Printf (" The total rows is: % d \ n ", rows);
Fields=mysql_num_fields (res);
Printf (" The total fields is: % d \ n ", fields);
Printf (" the data in the table: \ n ");
Int j=0;
Char sendbuf [200].
While ((row=mysql_fetch_row (res)))
{
for(int i=0; i{
Printf (" % s \ \ t t, "row [I]);
Sendbuf [j++]=row [I];
}
printf("\n");
Write (fd, sendbuf, j);
}
The above code compiled for "sendbuf [j++]=row [I];" There will be a warning as shown in figure, this is my part of the code on the server, want to put the data in a database table is sent to the client, through the above code, the client receives data show not to come out, so I want to ask you is there any solution, thanks.
CodePudding user response:
Error reading the newspaper, like the type mismatch