I can’t assign the result of query to variable (the program is written in C). Here is what I do
char buffer[100];
while ((row = mysql_fetch_row(res)) != NULL) {
buffer = row[0];
}
A get this error during compile process
error: incompatible types in assignment
What is wrong here ?
Assuming it’s a string? C doesn’t have strings it has arrays of characters. So you have copy the characters from one array to another.
so use a copy function like