Jump to content

[SOLVED] Questions


CarlosEduardo2409

Recommended Posts

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 by CarlosEduardo2409
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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 by CarlosEduardo2409
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...