3 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
my $sth_history = $dbh->prepare("Select COUNT(auftr_num) AS Total from ticket_system WHERE auftr_num = '$recordset[2]'");
$sth_history->execute || die "Select from ticket_system fehlgeschlagen: DBI::errstr\n";
my $total = $sth_history->fetchrow_array();
$liste .= "<td>$total</td>";
if ($total > 0){
my $history_number = $dbh->prepare("Select MAX(history_num) from ticket_system WHERE auftr_num = '$recordset[2]'");
$history_number->execute || die "2.Select from ticket_system fehlgeschlagen: DBI::errstr\n";
my $last_history = $history_number->fetchrow_array();
$last_history++;
$liste .= "<td>$last_history</td>";
}
else {
$liste .= "<td>$total</td>";
$last_history = 1;
}
3 Einträge, 1 Seite |