diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index e957aa476..f569f2734 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2413,13 +2413,11 @@ sub getAllAttribsWhere my @attribs = @_; my @results = (); my $query; + my $query2; + $query2='SELECT * FROM ' . $self->{tabname} . ' WHERE (' . $whereclause . ") and " . q(`disable`) . " is NULL or " . q(`disable`) . " in ('0','no','NO','No','nO')"; + if ($xcatcfg =~ /^mysql:/) { #for mysql - $query = $self->{dbh}->prepare('SELECT * FROM ' - . $self->{tabname} - . ' WHERE (' - . $whereclause - . ") and " - . q(`disable`) . " is NULL or " . q(`disable`) . " in ('0','no','NO','No','nO'))"); + $query = $self->{dbh}->prepare($query2); } else { if ($xcatcfg =~ /^DB2:/) { #for DB2 $query = $self->{dbh}->prepare('SELECT * FROM '