Received: from shell.mpsi.net (shell.mpsi.net [207.252.220.24]) by hub.org (8.8.8/8.7.5) with ESMTP id KAA00609 for ; Fri, 22 May 1998 10:00:36 -0400 (EDT) Received: from localhost (alewis@localhost) by shell.mpsi.net (8.8.6/8.8.6.Beta3) with SMTP id OAA14995 for ; Fri, 22 May 1998 14:00:35 GMT Date: Fri, 22 May 1998 09:00:35 -0500 (CDT) From: Andy Lewis Reply-To: Andy Lewis To: pgsql-sql@postgreSQL.org Subject: escaping the ' Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I am running Postgres 6.3.2 / PHP 3.0 on Linux 2.0.30. I have a table that has 16 text fields in it. I have a PHP form that allows a user to enter info into that field. When a user enters an ' as in " item's " the query will fail. I have played around with it and can execute the query without error if I escape the ' . Such as " item\'s " Here's the big question: Is there anyway other than doing a ereg_replace(); in PHP to get around this problem? If I do a ereg_replace("'", "\'", $f1) in the PHP file and execute it, I have no problem. I dont recall having this problem in the earlier version of Postgres. As always, thanks in advance! Andy