From: Ken Wills <gfccall@mailbag.com>
To: pgsql-interfaces@hub.org
Subject: RE: your mail (Should have been problems with ')
Date: Mon, 23 Nov 1998 08:45:32 -0600
Message-ID: <000601be16ef$eccb64e0$211f46c6@kpw.gfc.net> (raw)
In-Reply-To: <Pine.BSF.4.05.9811231010020.29640-100000@thelab.hub.org>
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 '.
Ken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: gfccall@mailbag.com, pgsql-interfaces@hub.org
Subject: RE: your mail (Should have been problems with ')
In-Reply-To: <000601be16ef$eccb64e0$211f46c6@kpw.gfc.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox