-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdel_track.pl
More file actions
executable file
·47 lines (31 loc) · 844 Bytes
/
Copy pathdel_track.pl
File metadata and controls
executable file
·47 lines (31 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/perl
#
# pilot# igc task
#
require DBD::mysql;
#use Data::Dumper;
use TrackLib qw(:all);
use Defines qw(:all);
#use strict;
my $traPk;
if (scalar(@ARGV) < 1)
{
print "del_track.pl <traPk#>\n";
exit(1);
}
$traPk = 0 + $ARGV[0];
$dbh = db_connect();
if ($traPk < 1)
{
print "del_track.pl <traPk#>\n";
exit(1);
}
$dbh->do("delete from tblTaskResult where traPk=$traPk");
$dbh->do("delete from tblTrack where traPk=$traPk");
$dbh->do("delete from tblTrackLog where traPk=$traPk");
$dbh->do("delete from tblWaypoint where traPk=$traPk");
$dbh->do("delete from tblBucket where traPk=$traPk");
$dbh->do("delete from tblTrackMarker where traPk=$traPk");
$dbh->do("delete from tblComTaskTrack where traPk=$traPk");
#$query = "delete from tblComTaskTrack where traPk=$id$comcl";
print "Deleted track $traPk\n";