summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorivan <ivan>2002-03-29 17:27:18 +0000
committerivan <ivan>2002-03-29 17:27:18 +0000
commit12fca9ac80c2b0444a7916506f6e2a8fa98bc24d (patch)
treeaecbada128f643b9c13345e90098075ce0166b53 /httemplate/search
parent7eeed574765f53a3f279d1f5ba518f8c4cfaf386 (diff)
fix unlinked svc browse!
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/svc_acct.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index daf025a38..e28e00e61 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -21,13 +21,14 @@ $query ||= ''; #to avoid use of unitialized value errors
my $unlinked = '';
if ( $query =~ /^UN_(.*)$/ ) {
$query = $1;
- $unlinked = '
+ my $empty = driver_name =~ /^Pg$/i ? qq('') : qq("");
+ $unlinked = "
WHERE 0 <
( SELECT count(*) FROM cust_svc
WHERE cust_svc.svcnum = svc_acct.svcnum
- AND pkgnum IS NULL
+ AND ( pkgnum IS NULL OR pkgnum = 0 OR pkgnum = $empty )
)
- ';
+ ";
}
my(@svc_acct, $sortby);