Search Postgresql Archives

Re: stored queries and quoted strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux