Skip to content
Snippets Groups Projects
Commit 9738d2e3 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

consistent description retrieval

parent b0aa1436
No related branches found
No related tags found
No related merge requests found
...@@ -53,12 +53,12 @@ sub run { ...@@ -53,12 +53,12 @@ sub run {
my %description; my %description;
my %accession; my %accession;
my $sql = 'select source_id, priority_description from source where name like "MGI"'; my $sql = 'select source_id from source where name like "MGI" and priority_description like "descriptions"';
my $sth = $dbi->prepare($sql); my $sth = $dbi->prepare($sql);
$sth->execute(); $sth->execute();
my ($mgi_source_id, $desc); my ($mgi_source_id);
$sth->bind_columns(\$mgi_source_id, \$desc); $sth->bind_columns(\$mgi_source_id);
my @arr; my @arr;
while($sth->fetch()){ while($sth->fetch()){
push @arr, $mgi_source_id; push @arr, $mgi_source_id;
...@@ -69,7 +69,7 @@ sub run { ...@@ -69,7 +69,7 @@ sub run {
$sth = $dbi->prepare($sql); $sth = $dbi->prepare($sql);
$sth->execute(); $sth->execute();
my ($acc, $lab, $ver); my ($acc, $lab, $ver, $desc);
$sth->bind_columns(\$acc, \$lab, \$ver, \$desc); $sth->bind_columns(\$acc, \$lab, \$ver, \$desc);
while (my @row = $sth->fetchrow_array()) { while (my @row = $sth->fetchrow_array()) {
if(defined($desc)){ if(defined($desc)){
......
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