DBI placeholders

Поиск
Список
Период
Сортировка
От Evan Zane Macosko
Тема DBI placeholders
Дата
Msg-id Pine.OSF.4.33.0108201137400.10434-100000@is01.fas.harvard.edu
обсуждение исходный текст
Ответы Re: DBI placeholders  (Adrian Phillips <adrianp@powertech.no>)
Список pgsql-general
Hi everyone,


I'm wondering if someone could explain to me how placeholders work with
Perl DBI linking to Postgresql.  I seem to have trouble using them in a
loop.  For example, the code:

my $i = 0;
$sth = $dbh->prepare("UPDATE yeast1 set ? = '?' where yeast1.orf =
temp.orf");
while ($i<$#columns) {
    $sth->execute($i, $tables[$i-1];
    $i++;
}

This returns an error from the Pg parser.  Any suggestions?  Also, this
query is incredibly slow--does anyone have suggestions for optimization?

Thanks!
Evan



В списке pgsql-general по дате отправления:

Предыдущее
От: bend@ITstuff.net (John Bend)
Дата:
Сообщение: Re: Cant compile using stock RH71 and libpq++
Следующее
От: Evan Zane Macosko
Дата:
Сообщение: Re: Real newbie question.