Home > Software engineering >  VS2010 C development mysql database, access line how to assign a string array
VS2010 C development mysql database, access line how to assign a string array

Time:09-27


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 first

CodePudding user response:

The row is in itself a string.

CStringA tStr=row [0];
  • Related