pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Cunningham <billc@bally.com>
To: gfchelp@gflesch.com
Cc: Pgsql-Admin (E-mail) <pgsql-admin@postgreSQL.org>
Subject: Re:
Date: Mon, 30 Nov 1998 22:33:06 +0000
Message-ID: <36631D22.33F1A4F0@bally.com> (raw)
References: <000401be16e6$7ee24600$211f46c6@kpw.gfc.net>

Ken Wills wrote:

> Hi!
>
> 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.
>
> my $query_string=qq{INSERT INTO CALLS (ca_service_id, ca_org_name, ca_phone_number, ca_status,
> ca_product, ca_problem, ca_resolution, ca_contact_name, ca_assigned, ca_date) VALUES ('$service_id',
> '$org_name', '$phone_number', '$status', '$product', '$problem', '$resolution', '$contact',
> '$assigned', '$time_now')};
>

I have the same problem with DB2. I encode the ' character as &39 or 0x39. Then on output I reparse the
field and display the results. (I also encode the & character or whatever I use to delimit the
character.)


--
Bill Cunningham
Database Development Project Lead
Bally Systems






view thread (8+ messages)

Message-ID: <36631D22.33F1A4F0@bally.com>
Permalink:  ../36631D22.33F1A4F0@bally.com/
Also on:    postgresql.org/message-id/36631D22.33F1A4F0@bally.com

 · 

reply

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: billc@bally.com, gfchelp@gflesch.com, pgsql-admin@postgreSQL.org
  Subject: Re:
  In-Reply-To: <36631D22.33F1A4F0@bally.com>

* 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