summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_main.cgi2
-rwxr-xr-xhttemplate/search/cust_pkg.cgi11
-rwxr-xr-xhttemplate/search/svc_acct.cgi5
3 files changed, 5 insertions, 13 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index b4565601b..d9d4e657c 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -159,7 +159,7 @@ if ( $cgi->param('browse')
}
my @just_cust_main;
- if ( driver_name eq /mysql/ ) {
+ if ( driver_name eq 'mysql' ) {
@just_cust_main = qsearch('cust_main', \%search, 'cust_main.*',
",temp1_$$,temp2_$$ $ncancelled $orderby $limit");
} else {
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 7dfacf189..abf6eee4c 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -86,7 +86,7 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) {
WHERE cust_pkg.pkgnum = cust_svc.pkgnum
AND cust_svc.svcpart = pkg_svc.svcpart
AND cust_pkg.pkgpart = pkg_svc.pkgpart
- GROUP BY cust_svc.pkgnum,cust_svc.svcnum";
+ GROUP BY cust_svc.pkgnum,cust_svc.svcpart";
$sth = dbh->prepare($query) or die dbh->errstr. " preparing $query";
$sth->execute or die "Error executing \"$query\": ". $sth->errstr;
@@ -129,12 +129,9 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) {
$total = $sth->fetchrow_arrayref->[0];
- #if ( driver_name eq 'mysql' ) { #remove ORDER BY for mysql? hua?
- # @cust_pkg = qsearch('cust_pkg',{}, '', "$unconf $limit" );
- #} else {
- # @cust_pkg = qsearch('cust_pkg',{}, '', "$unconf ORDER BY pkgnum $limit" );
- #}
- @cust_pkg = qsearch('cust_pkg',{}, '', "$unconf ORDER BY pkgnum $limit" );
+ my $tblname = driver_name eq 'mysql' ? 'cust_pkg.' : '';
+ @cust_pkg =
+ qsearch('cust_pkg',{}, '', "$unconf ORDER BY ${tblname}pkgnum $limit" );
if ( driver_name eq 'mysql' ) {
$query = "DROP TABLE temp1_$$,temp2_$$;";
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index eba032d52..0a4338b52 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -64,11 +64,6 @@ if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' ) {
$total = $sth->fetchrow_arrayref->[0];
- #if ( driver_name eq 'mysql' ) { #remove ORDER BY for mysql? hua?
- # @svc_acct = qsearch('svc_acct', {}, '', "$unlinked $limit");
- #} else {
- # @svc_acct = qsearch('svc_acct', {}, '', "$unlinked $orderby $limit");
- #}
@svc_acct = qsearch('svc_acct', {}, '', "$unlinked $orderby $limit");
}