sprintf(szSql, "SELECT F.*, R.* FROM tFaktura F, tFakturaRad R WHERE F.year = %d AND F.fakturaid = R.fakturaid ORDER BY F.fakturaid, R.fakturaid", iCurYear);
mysql_real_query(&mysql, szSql, strlen(szSql));
rs = mysql_store_result(&mysql);
while ( (row = mysql_fetch_row(rs)) )
{
/* The row contains the fields in a array row[0] to row[x] where x is the
last field in the result set */
/* Since each field is returned in a string you must convert it to
whatever you need (int, float) using atof(), atoi() before using it */
printf("%d", atoi(row[0]));
}
mysql_free_result(rs);
/* UPDATEs and DELETEs needs no resultsets */
sprintf(szSql, "DELETE FROM tKund WHERE kundid = %d", iRecordNo);
if (mysql_real_query(&mysql, szSql, strlen(szSql)) != 0)