Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
9ea4b311
Commit
9ea4b311
authored
Jul 18, 2008
by
Daniel Rios
Browse files
fixed problem when bind_param_generic_fetch using multiple parameters
parent
4b0f8b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
+6
-3
No files found.
modules/Bio/EnsEMBL/DBSQL/BaseAdaptor.pm
View file @
9ea4b311
...
...
@@ -382,8 +382,10 @@ sub generic_fetch {
my
$bind_parameters
=
$self
->
bind_param_generic_fetch
();
if
(
defined
$bind_parameters
){
#if we have bind the parameters, call the DBI to bind them
for
(
my
$i
=
0
;
$i
<
length
@
{
$bind_parameters
};
$i
++
){
$sth
->
bind_param
(
$i
+
1
,
$bind_parameters
->
[
$i
]
->
[
0
],
$bind_parameters
->
[
$i
]
->
[
1
]);
my
$i
=
1
;
foreach
my
$param
(
@
{
$bind_parameters
}){
$sth
->
bind_param
(
$i
,
$param
->
[
0
],
$param
->
[
1
]);
$i
++
;
}
#after binding parameters, undef for future queries
$self
->
{'
_bind_param_generic_fetch
'}
=
();
...
...
@@ -425,7 +427,8 @@ sub fetch_by_dbID{
#construct a constraint like 't1.table1_id = 123'
my
@tabs
=
$self
->
_tables
;
my
(
$name
,
$syn
)
=
@
{
$tabs
[
0
]};
my
$constraint
=
"
${syn}
.
${name}
_id =
$id
";
$self
->
bind_param_generic_fetch
(
$id
,
SQL_INTEGER
);
my
$constraint
=
"
${syn}
.
${name}
_id = ?
";
#Should only be one
my
(
$feat
)
=
@
{
$self
->
generic_fetch
(
$constraint
)};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment