(
'table' => 'cust_svc',
'select' => 'svc_all.svcnum AS svcnum, '.
- 'COALESCE(svc_all.svcdb, part_svc.svcdb) AS svcdb',
+ 'COALESCE(svc_all.svcdb, part_svc.svcdb) AS svcdb, '.
+ 'cust_svc.*',
'addl_from' => $addl_from,
'hashref' => {},
'extra_sql' => $extra_sql,
my $sql_query;
-my $orderby = 'ORDER BY svcnum'; #has to be ordered by something
- #for pagination to work
+my $orderby = 'ORDER BY cust_svc.svcnum'; #has to be ordered by something
+ #for pagination to work
if ( length( $cgi->param('search_svc') ) ) {