Received: from garlic.bally.com (gate.bally.com [204.253.86.6]) by hub.org (8.9.1/8.9.1) with SMTP id RAA12162 for ; Mon, 30 Nov 1998 17:35:51 -0500 (EST) (envelope-from billc@bally.com) Received: (from uucp@localhost) by garlic.bally.com (8.6.12/3.1) id OAA15446; Mon, 30 Nov 1998 14:33:06 -0800 Received: from onion.bally.com(193.10.10.4) by garlic.bally.com via smap (V2.0) id xma013899; Mon, 30 Nov 98 14:32:39 -0800 Received: from bally.com (penguin.bally.com [10.2.200.34]) by turnip.bally.com (8.6.12/3.2) with ESMTP id OAA20187; Mon, 30 Nov 1998 14:39:45 -0800 Sender: billc@bally.com Message-ID: <36631D22.33F1A4F0@bally.com> Date: Mon, 30 Nov 1998 22:33:06 +0000 From: Bill Cunningham X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.34 i586) X-Accept-Language: en MIME-Version: 1.0 To: gfchelp@gflesch.com CC: "Pgsql-Admin (E-mail)" Subject: Re: References: <000401be16e6$7ee24600$211f46c6@kpw.gfc.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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