Re: DBI placeholders

Поиск
Список
Период
Сортировка
От Adrian Phillips
Тема Re: DBI placeholders
Дата
Msg-id 87r8u5sbs7.fsf@grannyogg.localnet
обсуждение исходный текст
Ответ на DBI placeholders  (Evan Zane Macosko <macosko@fas.harvard.edu>)
Ответы Re: DBI placeholders  (will trillich <will@serensoft.com>)
Список pgsql-general
>>>>> "Evan" == Evan Zane Macosko <macosko@fas.harvard.edu> writes:

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

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

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

Placeholders are for values not for column names, and you shouldn't
have quotes around the ? either.

Sincerely,

Adrian Phillips

--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

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

Предыдущее
От: Gayland Gump
Дата:
Сообщение: macaddr data type issue
Следующее
От: Justin Clift
Дата:
Сообщение: Re: macaddr data type issue