From: Will Budic Date: Fri, 17 Jan 2020 04:30:31 +0000 (+1100) Subject: xc_lst for nested excludes. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=ddb58bb700703364c42e15581ccb1f825f5a36bc;p=LifeLog.git xc_lst for nested excludes. --- diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 6965fc6..341e363 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -376,7 +376,7 @@ qq(
prepare($stmt); - $rv = $st->execute() or die or die "

Error->" & $DBI::errstri & "

"; + $rv = $st->execute() or die "

Error->" & $DBI::errstri & "

"; if ( $rv < 0 ) { print "

Error->" & $DBI::errstri & "

"; } @@ -981,7 +981,14 @@ try { $sand = "and ID_CAT == $prm_vc"; } elsif($prm_xc){ - $sand = "and ID_CAT != $prm_xc"; + + if(@xc_lst){ + foreach (@xc_lst){ + $sand .= "and ID_CAT!=$_ "; + } + } + else{ $sand = "and ID_CAT != $prm_xc"; } + } $stmt = qq(SELECT PID, ID_CAT, DATE, LOG, AMOUNT, AFLAG, RTF, STICKY from VW_LOG where PID <= $rs_cur and STICKY != 1 $sand;);