Skip to content
Snippets Groups Projects
Commit 863c7cc9 authored by Daniel Rios's avatar Daniel Rios
Browse files

changed prepare statement to allow passing arguments (mysql_use_result)

parent 4c9f730b
No related branches found
No related tags found
No related merge requests found
......@@ -541,21 +541,21 @@ sub db_handle {
=cut
sub prepare {
my ($self,$string) = @_;
my ($self,@args) = @_;
if( ! $string ) {
if( ! $args[0] ) {
throw("Attempting to prepare an empty SQL query.");
}
# print STDERR "SQL(".$self->dbname."):$string\n";
my $sth = $self->db_handle->prepare($string);
my $sth = $self->db_handle->prepare(@args);
# return an overridden statement handle that provides us with
# the means to disconnect inactive statement handles automatically
bless $sth, "Bio::EnsEMBL::DBSQL::StatementHandle";
$sth->dbc($self);
$sth->sql($string);
$sth->sql($args[0]);
$self->query_count($self->query_count()+1);
return $sth;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment