I got it working, but needed a workaround, i changed:
$numcflsinfpres = dbquery('SELECT fs_ship_id,fs_ship_cnt FROM '.$db_table['fleet_ships'].' WHERE fs_fleet_id='.$numcflinfparr['fleet_id']);
while($numcflsarr = mysqli_fetch_assoc($numcflsinfpres)) {
array_push($numcflinfparr['fleet_ships'],$numcflsarr);
}
to a function and used:
array_push($numcflinfparr[‘fleet_ships’], get_babylon_sub_object_data($numcflinfparr[‘fleet_id’]));
The question is what is recommended, because i update the whole solar system data, which is actually not much just a 4-5 depth associated php array that is built by mysqli_fetch_assocs, but when you seperate parts into function it works, like I showed above?
The problem is I have to update the whole solar system, because otherwise i can’t determine if planets are fusioned when I only update planetwise. I would have to change my whole planet fusion system in html/php/DB and to get planetwise updates working, which will be less mysqli_fetch_assocs into each other, but I hoped not to have to.
Another option could be a extra planet fusion check algorithm by given planetID, which seems the best to me.
Knowing all that, you think I can keep using setTimeout → completed:setTimeout? So update process is initialized once and request itself, when the request for a solar system is completed. I have set timeout to 2 seconds now, so there is 2 seconds between every ajax.