| From: | Andy Lewis <alewis(at)mpsi(dot)net> |
|---|---|
| To: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | escaping the ' |
| Date: | 1998-05-22 14:00:35 |
| Message-ID: | Pine.LNX.3.95.980522085023.14868A-100000@shell.mpsi.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Eric McKeown | 1998-05-22 22:41:10 | Re: [SQL] escaping the ' |
| Previous Message | Tom Good | 1998-05-22 12:35:17 | Re: [SQL] Are there JDBC that used with PostgreSQL? |