C API 함수인 mysql_affetched_rows를 사용해 보았습니다.
mysql_init(&mysql);
if(!mysql_real_connect(&mysql,\localhost\,\root\,\,\db\,0,(char
*)NULL,0))
{
printf(\error_no:%d\n%s\n\,mysql_errno(&mysql_line),mysql_error(&mys
ql_line));
exit(1);
}
query = \update sub_inf set a=100 where no = 1000 ;\;
mysql_real_query(&mysql,query,strlen(query));
affetch = mysql_affected_rows(&mysql);
printf(\%d\n\,affetch);
printf(\%d\n\,mysql.affected_rows);
print문 결과는 모두 0으로 나오네요..
1로 나와야 할것 같은에요..update를 10개 이상 해도 마찬가지입니다.
제가 혹시 잘못 한건 아닌지요..
|