CarlosEduardo2409 Posted March 17, 2018 Report Share Posted March 17, 2018 (edited) Hello guys, now I have doubts. 1. The first is more or less an error and a doubt. I made a count to count how many registered pilots and pending pireps have, the two are on the same count, it works fine, but an example: If I have a pending pilot and I accept this pilot, the count does not reset, she It's 1. I do not know if it's because I have two count, I just do not know. This is the code I am using: <?php echo count(//code for count pireps\\ . //code for count pilots pending\\); ?> 2. I wanted to make a graph to tell the altitude and ground speed that the pilot was in his PIREP, I saw in some topics that he had but did not have the complete answer. The only thing I know is that the rawdata column needs to be populated, but I do not know if SmartCARS fills in, because it's not here. Thanks. Regards, Carlos. Edited March 18, 2018 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
web541 Posted March 18, 2018 Report Share Posted March 18, 2018 1. Try this <?php $pendingpireps = count(PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING))); $pendingpilots = count(PilotData::findPilots(array('p.confirmed' => PILOT_PENDING))); echo ($pendingpireps + $pendingpilots); 2. smartCARS doesn't report the rawdata on its own. You could modify their web scripts and try and make it work, but this depends if the developer has hardcoded anything on the actual app's side or not. Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted March 18, 2018 Author Report Share Posted March 18, 2018 I think it's working now, thanks again, web. And in the part of smartCARS it is better leave like this anyway. Thanks again web. Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted March 18, 2018 Author Report Share Posted March 18, 2018 (edited) @web541 But another question from my first question: I have a trains module, and he also counts how many pilots he has outstanding. And his code for counting is this: <?php FlightAcademyData::GetTrainingRequests() ?> Then you put him on the count. But I also need him to stay with the counts of the outstanding pilots and the pending pireps. But if I put it still gets that '1' error. [SOLVED] Edited March 22, 2018 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.