Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and then executing the appropriate one, OR$dbq1 = $dbh->prepare(q{SELECT name FROM mytable WHERE id = ?}q); $dbq2 = $dbh->prepare(q{SELECT age FROM mytable WHERE id = ?}); $dbq3...
and then using:$dbq = $dbh->prepare(q{SELECT * FROM mytable WHERE id = ?});
or(undef, undef, name, undef) = $dbh->fetchrow_array();
etc. for whichever value I actually want.(undef, undef, undef, age) = $dbh->fetchrow_array();
If I do the first option, I will need a -lot- of seperate prepares, which is why I ask.
Thanks in advance,
--
A frustrated llama.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI Efficiency
by chromatic (Archbishop) on Jan 16, 2003 at 21:43 UTC | |
|
Re: DBI Efficiency
by mpeppler (Vicar) on Jan 16, 2003 at 22:04 UTC | |
by Anonymous Monk on Jan 16, 2003 at 22:20 UTC | |
by mpeppler (Vicar) on Jan 16, 2003 at 22:47 UTC | |
|
Re: DBI Efficiency
by runrig (Abbot) on Jan 16, 2003 at 21:59 UTC | |
|
Re: DBI Efficiency
by rir (Vicar) on Jan 17, 2003 at 20:07 UTC | |
|
Re: DBI Efficiency
by dws (Chancellor) on Jan 18, 2003 at 22:00 UTC | |
|
Re: DBI Efficiency
by Anonymous Monk on Jan 17, 2003 at 00:20 UTC | |
by mpeppler (Vicar) on Jan 17, 2003 at 01:33 UTC | |
|
Re: DBI Efficiency
by herveus (Prior) on Jan 17, 2003 at 12:40 UTC | |
|
Re: DBI Efficiency
by OM_Zen (Scribe) on Jan 18, 2003 at 20:02 UTC |