30.01.2018, 04:16
Your query looks fine, it should load data.
But i don't know why do you have this?
You are looping through whole array which is probably empty i assume, so you are loading the last row into the whole array.
You don't need that, simply loop once like this:
And you are not saving the dynamic object id anywhere, i don't know if its intentional or not. Just pointing out.
But i don't know why do you have this?
PHP код:
for(new h; h < sizeof(tInfo); h++)
{
if(tInfo[h][t_id] == 0)
{
You don't need that, simply loop once like this:
PHP код:
// this goes on top, it checks if the data in database is not more than the declared array size, if so we only load till the limit
if (rows > MAX_TOWER) {
rows = MAX_TOWER;
}
for(new i; i < rows; i++) {
tInfo[i][···] = cache_get_field_content_int(i, ...);
}