- $where .= "
- AND ( county = $county OR $county = '' )
- AND ( state = $state OR $state = '' )
- AND country = $country
- ";
- $where .= ' AND taxclass = '. dbh->quote( $cgi->param('taxclass') )
+ push @where,
+ " ( county = $county OR $county = '' ) ",
+ " ( state = $state OR $state = '' ) ",
+ " country = $country "
+ ;
+ if ( $cgi->param('taxname') ) {
+ push @where, 'itemdesc = '. dbh->quote( $cgi->param('taxname') );
+ #} elsif ( $cgi->param('taxnameNULL') {
+ } else {
+ push @where, "( itemdesc IS NULL OR itemdesc = '' OR itemdesc = 'Tax' )";
+ }
+
+ push @where, ' taxclass = '. dbh->quote( $cgi->param('taxclass') )