MySQL r7 - problem with loading data
#1

Hi.

This is my code for getting data from MySQL:

Код:
public OnAreaLoad()
{
	new fields, rows, aUID = 0;
    cache_get_data(rows, fields, sqlHandle);
	printf("ROWS: %d FIELDS: %f", rows, fields);
	
    for(new i = 0; i != rows; i++)
    {
		aInfo[aUID][aID]         = cache_get_row_int(i, 0, sqlHandle);
		cache_get_row(i, 1, aInfo[aUID][aSektor], sqlHandle);
		aInfo[aUID][aX1]         = cache_get_row_int(i, 2, sqlHandle);
		aInfo[aUID][aY1]         = cache_get_row_int(i, 3, sqlHandle);
		aInfo[aUID][aX2]         = cache_get_row_int(i, 4, sqlHandle);
		aInfo[aUID][aY2]         = cache_get_row_int(i, 5, sqlHandle);
		aInfo[aUID][aTeam]       = cache_get_row_int(i, 6, sqlHandle);
		aInfo[aUID][aGangZone]   = GangZoneCreate(aInfo[aUID][aX1], aInfo[aUID][aY1], aInfo[aUID][aX2], aInfo[aUID][aY2]);
		Iter_Add(iAreas, aUID);
    	aUID++;
	}
    print("----------------------------------");
	printf("** Załadowano %d stref! **", aUID);
	return 1;
}
Result:
- all variables are null
- fields = 0.0000
- rows = 400 (correct)

What's wrong with this code? Thanks for help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)