Skip to content
Snippets Groups Projects
Commit 53595c66 authored by Nathan Johnson's avatar Nathan Johnson
Browse files

store: added undef check for db_release for is NULL clause

parent af9dc3e1
No related branches found
No related tags found
No related merge requests found
......@@ -344,17 +344,26 @@ sub store {
# Check for the existance of the external_db, throw if it does not exist
#
my $dbRef;
my ($dbRef, $release_clause);
if ( !$ignore_release ) {
if(defined $exObj->release()){
$release_clause = " AND db_release = ?";
}
else{
$release_clause = " AND db_release is NULL";
}
my $sth = $self->prepare( "
SELECT external_db_id
FROM external_db
WHERE db_name = ?
AND db_release = ?" );
$release_clause" );
$sth->bind_param( 1, $exObj->dbname(), SQL_VARCHAR );
$sth->bind_param( 2, $exObj->release(), SQL_VARCHAR );
$sth->bind_param( 2, $exObj->release(), SQL_VARCHAR ) if defined $exObj->release();
$sth->execute();
......
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