|
见20.4.51为什么在sql/Index.html'>mysql_query()返回成功后,sql/Index.html'>mysql_store_result()有时返回NULL?。 20.4.35.2返回值表示一个结果集合中字段数量的一个无符号整数。 20.4.35.3错误无。 20.4.35.4范例MYSQL_RES*result;unsignedintnum_fields;unsignedintnum_rows;if(sql/Index.html'>mysql_query(&sql/Index.html'>mysql,query_string)){//error}else//querysucceeded,processanydatareturnedbyit{result=sql/Index.html'>mysql_store_result(&sql/Index.html'>mysql);if(result)//therearerows{num_fields=sql/Index.html'>mysql_num_fields(result);//retrieverows,thencallsql/Index.html'>mysql_free_result(result)}else//sql/Index.html'>mysql_store_result()returnednothing;shouldithave?{if(sql/Index.html'>mysql_errno(&sql/Index.html'>mysql)){fprintf(stderr,"Error:%s\n",sql/Index.html'>mysql_error(&sql/Index.html'>mysql));}elseif(sql/Index.html'>mysql_field_count(&sql/Index.html'>mysql)==0){//querydoesnotreturndata//(itwasnotaSELECT)num_rows=sql/Index.html'>mysql_affected_rows(&sql/Index.html'>mysql);}}}上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] 下一页
|