Re: escaping arrays in perl dbi

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: escaping arrays in perl dbi
Дата
Msg-id 200205100109.27473.barwick@gmx.net
обсуждение исходный текст
Ответ на escaping arrays in perl dbi  (Vincent Stoessel <vincent@xaymaca.com>)
Список pgsql-sql
On Thursday 09 May 2002 16:12, Vincent Stoessel wrote:
> Hello All,
> I am trying to figure out how I need to change the string below in
> order to do an insert into my table using perl dbi. perl seems to choke
> on the curly brackets.

It's choking on the unescape quotes...

> $dbh->do("update basket set f_order ='{"apple",0}' where cap ='I'");

qq is your friend:

$dbh->do(qq|update basket set f_order ='{"apple",0}' where cap ='I'|);

Type

perldoc perlop

into a nearby commandline and look for the section "Quote and Quote-like
Operators" for more info.


Ian Barwick


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

Предыдущее
От: Vincent Stoessel
Дата:
Сообщение: Re: escaping arrays in perl dbi
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Help with indexes