more improvements
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b91b558914
commit
4a5060cd39
@ -3060,7 +3060,7 @@ sub delEntries
|
||||
|
||||
Example:
|
||||
$table = xCAT::Table->new('passwd');
|
||||
@tmp=$table->getAttribs({'key'=>'ipmi'},('username','password');
|
||||
@tmp=$table->getAttribs({'key'=>'ipmi'},('username','password'));
|
||||
Comments:
|
||||
none
|
||||
|
||||
@ -3140,7 +3140,6 @@ sub getAttribs
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
my $xcatcfg =get_xcatcfg();
|
||||
#print "Uncached access to ".$self->{tabname}."\n";
|
||||
my $statement = 'SELECT * FROM ' . $self->{tabname} . ' WHERE ';
|
||||
my @exeargs;
|
||||
@ -3164,11 +3163,9 @@ sub getAttribs
|
||||
$statement .= $dkeypair . " is NULL and " ;
|
||||
}
|
||||
}
|
||||
if ($xcatcfg =~ /^mysql:/) { #for mysql
|
||||
$statement .= "(" . q(`disable`) . " is NULL or " . q(`disable`) . " in ('0','no','NO','No','nO'))";
|
||||
} else {
|
||||
$statement .= "(\"disable\" is NULL or \"disable\" in ('0','no','NO','No','nO'))";
|
||||
}
|
||||
# delimit the disable column based on the DB
|
||||
my $disable= &delimitcol("disable");
|
||||
$statement .= "(" . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO'))";
|
||||
#print "This is my statement: $statement \n";
|
||||
my $query = $self->{dbh}->prepare($statement);
|
||||
unless (defined $query) {
|
||||
|
Loading…
Reference in New Issue
Block a user