Remaining the question:
I have a table in Mysql where I need to display the person's name as soon as they type their RG. I am making a code where I just try to do the search to see if it is fetching normally, but I can not display it on the screen.
Follow the code:
int main(){
MYSQL conexao;
int res;
int esco = 2;
char query[100];
mysql_init(&conexao);
if ( mysql_real_connect(&conexao, "localhost", "root", "", "teatro", 0, NULL, 0) ){
sprintf(query,"select tb_aluno_nome from tb_aluno where tb_aluno_rg = '999999999';");
res = mysql_query(&conexao,query);
if (!res)
printf("nome: %i",res);
system("pause");
return(0);
}
}