diff --git a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm index 3f1bf0e81d2f9ec8e7cfc1abc2dcd8cc30b746d9..87189b2768bf451d9f260c514ae82d3927e3f2eb 100644 --- a/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm @@ -145,13 +145,11 @@ SELECT term.term_id, ontology.namespace FROM ontology, term -WHERE ontology.name = ? - AND ontology.ontology_id = term.ontology_id +WHERE ontology.ontology_id = term.ontology_id AND term.accession = ?); my $sth = $this->prepare($statement); - $sth->bind_param( 1, $this->{'ontology'}, SQL_VARCHAR ); - $sth->bind_param( 2, $accession, SQL_VARCHAR ); + $sth->bind_param( 1, $accession, SQL_VARCHAR ); $sth->execute();