Re: [INTERFACES] RE: your mail (Should have been problems with ')

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: gfchelp(at)gflesch(dot)com
Cc: pgsql-interfaces(at)hub(dot)org
Subject: Re: [INTERFACES] RE: your mail (Should have been problems with ')
Date: 1998-11-23 15:35:34
Message-ID: Pine.BSF.4.05.9811231134460.29640-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-interfaces

On Mon, 23 Nov 1998, Ken Wills wrote:

> Firstly, thanks to everone who replied so fast!!
>
> > I have an annoying problem, that I just haven't been able to get around yet. When I parse the
> > input from a form and go to insert it eveything works fine as long as the user doesn't use
> > the ' character in the input. I've tried using qw{} and qq{}, which either don't interpolate
> >> or give me errors. Anyone have any suggestions? Postgres 6.4, Apache 1.3, mod_perl 1.16.
> >> The insert statement is below.
>
> >escape your imput strings first...something like:
>
> a number of people suggested something like:
>
> >$phone_number =~ s/'/\\'/g;
>
> Ok, I tried this - it does what it looks like is supposed to. If I enter:
> John's shoes, I get John\'s shoes. Unfortunatly I still get an error. If i enter it
> as John's shoes' ,I dont get an error. Seems like it only likes them in pairs. The funny thing is if
> I supply them in pairs, it inserts the whole string, I'd have thought that it would parse them
> or something, and only insert the values between the '.

Have you tried doing:

print STDERR ${inputstr}, "\n";

To see what your 'insert into...' string looks like exactly? It looks
like you are missing a ' in there somewhere when you are generating yoru
string...

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ken Wills 1998-11-23 15:58:48 RE: [INTERFACES] RE: your mail (Should have been problems with ')
Previous Message Ken Wills 1998-11-23 15:16:25 RE: [INTERFACES] RE: your mail (Should have been problems with ')

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dirk Lutzebaeck 1998-11-23 15:42:47 rule plan string too big.
Previous Message Ken Wills 1998-11-23 15:16:25 RE: [INTERFACES] RE: your mail (Should have been problems with ')