I retrieve rows via C API.
MYSQL_ROW row;
int i=0;
char* A[100];
while ((row = mysql_fetch_row(result))){
A[i]=row; // My Question
i++;
}
mysql_free_result(result);
mysql_close(con);
for(int i=0;i<sizeof(A);i++){
printf("%s\n",A[1]);
}
How can I save the entire rows in an array, independent of MySQL connection?
MYSQL_ROWis an alias forchar *, then you just copy the pointer itself, not the data it actually points to.