Received: from glacier.binc.net (glacier.binc.net [205.173.176.10]) by hub.org (8.9.1/8.9.1) with ESMTP id KAA04432 for ; Mon, 23 Nov 1998 10:58:27 -0500 (EST) (envelope-from gfccall@mailbag.com) Received: from kpw (msn-1-33.x2.binc.net [198.70.31.33]) by glacier.binc.net (8.8.8/8.8.6) with ESMTP id JAA05287 for ; Mon, 23 Nov 1998 09:58:26 -0600 Reply-To: From: "Ken Wills" To: Subject: RE: [INTERFACES] RE: your mail (Should have been problems with ') Date: Mon, 23 Nov 1998 09:58:48 -0600 Message-ID: <000d01be16fa$28bc0b80$211f46c6@kpw.gfc.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Importance: Normal >> >> >$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... I tried this, and can see whats causing the error. From apache's error log: --snip-- \' \' \' none7 [Mon Nov 23 09:54:31 1998] [error] DBD::Pg::db do failed: ERROR: Bad datetime external representation 'Mon Nov 23 09NULLNULL 1998' --snip-- the time field is the last one to go in here. the insert string looks like: 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')}; It seems like I am getting an extra \' from somewhere. I'll take a look at that. Thanks again to all. Ken