| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера