Once the result is returned from mysql_fetch_row() how can the fields from the row be copied separately. My data will only be 1 row
Similar to Steve’s suggestion is working.
mysql_query(conn, querystring);
result = mysql_store_result(conn);
num_rows = mysql_num_rows(result);
if (nums_row == 0){
printf("%s\n", "No data");
} else {
printf("%s\n", "Got data");
row = mysql_fetch_row(result);
printf("%s\n", row[0]);
printf("%s\n", row[1]);
}
The data you get back is an array:
or you can use list to assign variables:
or you can use an associative array: