if (mysql_query(&mysql,query) != 0) { /*执行SQL语句*/
printf("SELECT ERROR!!!\n");
mysql_close(&mysql);
exit(0);
}
result = mysql_store_result(&mysql);
while ( ( row = mysql_fetch_row(result) ) ) {
strcpy(number,row[0]);
strcpy(name,row);
strcpy(sex,row);
pay = atof(row);
if ( pay > max_pay )
&nbMYSQL。sp; max_pay=pay;
printf("number: %s\t name: %s\t sex: %s\t pay: %f\t\n",number,name,sex,pay);
}
C MySQL float类型数据 用 printf()打印
最新推荐文章于 2021-02-17 18:29:40 发布