Re: stored queries and quoted strings

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: stored queries and quoted strings
Дата
Msg-id 1175525540.1153.102.camel@localhost.localdomain
обсуждение исходный текст
Ответ на stored queries and quoted strings  ("filippo" <filippo2991@virgilio.it>)
Список pgsql-general
On fös, 2007-03-30 at 00:31 -0700, filippo wrote:
> Hello,
>
> I have a strange problem with stored queries like this
>
>   $sql = qq/
>          SELECT city, country
>          FROM countries
>          WHERE city LIKE ?
>          ORDER BY city
>            /;
>   $sthCity= $dbh->prepare($sql);
>   my $tempCity = $dbh->quote("n%");
>   $sthCity->execute($tempCity);

> the query doesn't return any value. It works only if I remove the -
> >quote().

you do not have to use quote() on the parameters of a prepared
statement, as this is already done for you.

gnari



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Using C# to create stored procedures
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: PlPg/SQL