perl DBI: problems searching text strings with ' symbol (es d'ambrose)

Started by filippoabout 19 years ago4 messagesgeneral
Jump to latest
#1filippo
filippo2991@virgilio.it

hello,

if I try to insert text like

$dbh->quote(qq/d'ambrose/);

when I try to search names with character lile ', I get this error

DBD::PgPP::st execute failed: Unknown message type: '­' at C:/Perl/
site/lib/DBD/
PgPP.pm line 730

I really need to store and select names with ' character, how can I
do?

Thanks,

Filippo

#2filippo
filippo2991@virgilio.it
In reply to: filippo (#1)
Re: perl DBI: problems searching text strings with ' symbol (es d'ambrose)

On 7 Apr, 01:26, "filippo" <filippo2...@virgilio.it> wrote:

hello,

if I try to insert text like

$dbh->quote(qq/d'ambrose/);

when I try to search names with character lile ', I get this error

I forgot to say that I need LIKE and %. I tried to use placeholders
but nothing changes.

#3filippo
filippo2991@virgilio.it
In reply to: filippo (#2)
Re: perl DBI: problems searching text strings with ' symbol (es d'ambrose)

On 7 Apr, 01:47, "filippo" <filippo2...@virgilio.it> wrote:

On 7 Apr, 01:26, "filippo" <filippo2...@virgilio.it> wrote:

just to clarify:

I can insert text into database. My problem are the SELECT query like
this

WHERE name LIKE $name

$name = $dbh->quote(qq/ d'am% / )

#4filippo
filippo2991@virgilio.it
In reply to: filippo (#3)
Re: perl DBI: problems searching text strings with ' symbol (es d'ambrose)

On 7 Apr, 10:13, "filippo" <filippo2...@virgilio.it> wrote:

solved, it is a DBD::PgPP bug. I changed to DBD::Pg, now it works fine.