This program can obtain the current row information, stored in a row [] array, I want to row [0] into cstrings type variable, how to operate? Mainly I don't understand the mysql row array is what type of,
CodePudding user response:
//return data lines
Int ret_rowNum=mysql_num_rows (res);
Printf (" found % d record \ n id, type, and the state, the username, password, "\ n", ret_rowNum);
//loop reads data
for (int i=0; i{
MYSQL_ROW row=mysql_fetch_row (res);
Printf (" % s % s % s \ n ", the row [0], row [3], the row [4]);
}
CodePudding user response:
No matter what type to a string to say again firstCodePudding user response:
The row is in itself a string.CStringA tStr=row [0];