$suspended_sth = dbh->prepare(
'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'.
' AND ( cancel IS NULL OR cancel = 0 )'.
- ' AND susp IS NOT NULL AND susp > 0'
+ ' AND susp IS NOT NULL AND susp != 0'
) or die dbh->errstr;
$canceled_sth = dbh->prepare(
'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'.
- ' AND cancel IS NOT NULL AND cancel > 0'
+ ' AND cancel IS NOT NULL AND cancel != 0'
) or die dbh->errstr;
} else {
Packages
<UL>
<LI><A HREF="search/cust_pkg.cgi?pkgnum">all packages (by package number)</A>
- <LI><A HREF="search/cust_pkg.cgi?SUSP_pkgnum">suspended packages (by package number)</A>
+ <LI><A HREF="search/cust_pkg.cgi?magic=suspended">suspended packages (by package number)</A>
<LI><A HREF="search/cust_pkg.cgi?APKG_pkgnum">packages with unconfigured services (by package number)</A>
<LI><A HREF="search/cust_pkg.html">packages (by next bill date range)</A>
</UL>
$qual = 'WHERE ( susp IS NULL OR susp = 0 )'.
' AND ( cancel IS NULL OR cancel = 0)';
} elsif ( $cgi->param('magic') eq 'suspended' ) {
- $qual = 'WHERE susp IS NOT NULL AND susp > 0'.
+ $qual = 'WHERE susp IS NOT NULL AND susp != 0'.
' AND ( cancel IS NULL OR cancel = 0)';
} elsif ( $cgi->param('magic') eq 'canceled' ) {
- $qual = 'WHERE cancel IS NOT NULL AND cancel > 0';
+ $qual = 'WHERE cancel IS NOT NULL AND cancel != 0';
} else {
die "guru meditation #420";
}
$sortby=\*pkgnum_sort;
- } elsif ( $query eq 'SUSP_pkgnum' ) {
-
- $sortby=\*pkgnum_sort;
-
- $qual = 'WHERE susp IS NOT NULL AND susp != 0';
-
} elsif ( $query eq 'APKG_pkgnum' ) {
$sortby=\*pkgnum_sort;