allor codice con correzione
codice:MYSQL mysql; int collegamentoDB(){ if (!(mysql_init(&mysql))) { printf ("Errore nella allocazione di memoria.\n"); return -1; } if (! mysql_real_connect (mysql, host, db_user, db_pass, "",0, NULL, 0)) { printf ("Errore nella connessione.\n"); return -2; } if (mysql_select_db (mysql, database)) { printf ("Errore nella selezione del database.\n"); return -3; } return 0; }

Rispondi quotando