#!/bin/perl use strict; use mysql; use CGI qw(:standard); my $ind = param('ind'); my $del = param('del'); my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1}); print header(); print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "Alarm entfernen\n"; if ($del eq "") { my $sth = $dbh->prepare("select ind,description,alert_type from alerts order by 'alert_typ','description'"); $sth->execute; print "
\n"; print "\n"; while (my $ref = $sth->fetchrow_arrayref()) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } print "\n\n"; print "
\n"; print "
\n"; } else { $dbh->do("delete from alerts where ind='$del'"); print "
Löschen durchgeführt!"; } print "\n"; print "\n";