Im Jahre 2005 hat das noch so funktioniert:
mysql_real_connect(connection_out, host, user, pass, dbas, 0, NULL, 0);
mysql_query(connection_out, "SELECT * FROM personen");
res_set = mysql_store_result(connection_out);
numrows = mysql_num_rows(res_set);
if(numrows == 0)
{
cout << "\n\t\tKeine Datens" << char(132) << "tze vorhanden";
getch();
}
else
{
while ((data_row = mysql_fetch_row(res_set)) != NULL)
{
for (i = 0; i < mysql_num_fields(res_set); i++)
{
printf(" %s ", data_row[i]);
}
cout << "\n\n";
}
}
mysql_close(connection_out);