# How to clean a LIVE MAP flight entry?

**URL:** <https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [September 13, 2010, 6:23pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390 "2010-09-13T18:23:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogerox](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rogerox](https://forum.phpvms.net/u/Rogerox)\
**Post date:** [September 13, 2010, 6:23pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/1 "2010-09-13T18:23:27Z")

</div>

Hi there,

I want to know if thereÂ´s any way to wipe the flight data from the LIVE MAP window, for example, after the flight is done (I plan to trigger an event from client to server side, at the PHP module, to make it clean the flight data).

I mean, how to code at server side (php module) to clean up just the pilots flight data (especific flight data, not all data at the map window).

Thank you in advance.

Regards,

Roger

---

<div class="post-metadata">

**Author:** ![joeri](https://forum.phpvms.net/user_avatar/forum.phpvms.net/joeri/32/30_2.png) [@joeri](https://forum.phpvms.net/u/joeri)\
**Post date:** [September 13, 2010, 6:26pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/2 "2010-09-13T18:26:08Z")

</div>

in your maintanace part off the admin you can do a reset acars then it will clean the whole map

---

<div class="post-metadata">

**Author:** ![Rogerox](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rogerox](https://forum.phpvms.net/u/Rogerox)\
**Post date:** [September 14, 2010, 1:16am UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/3 "2010-09-14T01:16:22Z")

</div>

> in your maintanace part off the admin you can do a reset acars then it will clean the whole map

Hi Joeri,

I need something to wipe out only the pilot and specific flight I was doing, not all the flights on the map.

Example:

I am PLT1123 flying FLT1244, when I end my flight, the MAP still shows it for several minutes/hours.

I would like to trigger an event with my ACARS client, telling the server side to call some tool to wipe only FLT1244

So the map that had this:

PLT1101 - John Xxxx FLT 1203

PLT1104 - Paul Yxxx FLT 1214

PLT1123 - Peter Zzzz FLT 1244 \<= thatÂ´s my flight

PLT1107 - Carl Oooo FLT 1232

Will have this:

PLT1101 - John Xxxx FLT 1203

PLT1104 - Paul Yxxx FLT 1214

PLT1107 - Carl Oooo FLT 1232

Is that possible?

Thanks.

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [September 14, 2010, 1:48am UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/4 "2010-09-14T01:48:44Z")

</div>

The acarsdata table holds the pilot id. You can write a sql function to delete the row and call it when you want to. Something like -\>

```
function delete_pilotdata($pilotid) {

   $query = "DELETE FROM phpvms_acarsdata WHERE pilotid='$pilotid'";

   DB::query($query);

}

```

inside of a data class would do it for you. Call that function from your acars module you are building and include the pilot id in the call.

---

<div class="post-metadata">

**Author:** ![Rogerox](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Rogerox](https://forum.phpvms.net/u/Rogerox)\
**Post date:** [September 15, 2010, 2:58am UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/5 "2010-09-15T02:58:02Z")

</div>

> The acarsdata table holds the pilot id. You can write a sql function to delete the row and call it when you want to. Something like -\>
> 
> function delete\_pilotdata($pilotid) {
> 
> $query = “DELETE FROM phpvms\_acarsdata WHERE pilotid=‘$pilotid’”;
> 
> DB::query($query);
> 
> }
> 
> inside of a data class would do it for you. Call that function from your acars module you are building and include the pilot id in the call.

Thank you, Simpilot, thatÂ´s exactly what I needed!

Regards,

Roger

---

<div class="post-metadata">

**Author:** ![richipilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/richipilot/32/501_2.png) [@richipilot](https://forum.phpvms.net/u/richipilot)\
**Post date:** [January 11, 2015, 8:40pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/6 "2015-01-11T20:40:05Z")

</div>

Simpilot,

How should I enter that on my website to make that flights completed must be ereased from the map?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![simpilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/simpilot/32/26_2.png) [@simpilot](https://forum.phpvms.net/u/simpilot)\
**Post date:** [January 11, 2015, 9:03pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/7 "2015-01-11T21:03:33Z")

</div>

> Simpilot,
> 
> How should I enter that on my website to make that flights completed must be ereased from the map?
> 
> Thanks for your help

You can include it in a controller, or make your own (preferred) so it does not get overwritten in an update. If you are just trying to make sure pilots do not show on the map after a flight is completed you could just set the config for ACARS\_LIVE\_TIME to a minimum, something like 3 minutes. This will cause any flight that has not been updated in the last 3 minutes be dropped from the display.

```
# ACARS options
# Minutes, flights to show on the ACARS
# Default is 720 minutes (12 hours)
Config::Set('ACARS_LIVE_TIME', 720);

```

---

<div class="post-metadata">

**Author:** ![richipilot](https://forum.phpvms.net/user_avatar/forum.phpvms.net/richipilot/32/501_2.png) [@richipilot](https://forum.phpvms.net/u/richipilot)\
**Post date:** [January 11, 2015, 9:34pm UTC](https://forum.phpvms.net/t/how-to-clean-a-live-map-flight-entry/3390/8 "2015-01-11T21:34:07Z")

</div>

> You can include it in a controller, or make your own (preferred) so it does not get overwritten in an update. If you are just trying to make sure pilots do not show on the map after a flight is completed you could just set the config for ACARS\_LIVE\_TIME to a minimum, something like 3 minutes. This will cause any flight that has not been updated in the last 3 minutes be dropped from the display.
> 
> # ACARS options
> 
> # Minutes, flights to show on the ACARS
> 
> # Default is 720 minutes (12 hours)
> 
> Config::Set(‘ACARS\_LIVE\_TIME’, 720);

O\_o I have been so idiot xDD was so easy in this case, but thanks a lot for your help!!! really really appreciated thanks. SOLVED
