Re: Re(2): Test (fwd)

From: Timothy_Maguire(at)hartehanks(dot)com
To: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
Cc: pgsql-php(at)postgresql(dot)org, pgsql-php-owner(at)postgresql(dot)org
Subject: Re: Re(2): Test (fwd)
Date: 2001-06-14 18:25:47
Message-ID: OF52E78903.DCD7C6C2-ON85256A6B.00651B7F@hartehanks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


you can use the addslashes() function. This will make O'Brien O\'Brien and
the db will take it. In php4 this happens by default

Tim.

Timothy P. Maguire
Web Developer II
Harte-Hanks
978 436 3325


"Adam Lang"
<aalang(at)rutgersinsur To: <pgsql-php(at)postgresql(dot)org>
ance.com> cc:
Sent by: Subject: Re: Re(2): Test (fwd)
pgsql-php-owner(at)post
gresql.org


06/14/01 01:28 PM

It could fluctuate on each database, so always check the appropriate
documentation, but...

the standard way usually is to double the apostrophe

O'Brien would be O''Brien (the middle is two apostrophes, not a quote)

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Gary Hoffman" <ghoffman(at)ucsd(dot)edu>
To: <pgsql-php(at)postgresql(dot)org>
Cc: <aalang(at)rutgersinsurance(dot)com>
Sent: Thursday, June 14, 2001 1:12 PM
Subject: Re(2): [PHP] Test (fwd)

> aalang(at)rutgersinsurance(dot)com writes:
> >
> >Plus, you have to make sure to check for apostrophes. That will break
> >your
> >SQL statement if someone typed them into the text field.
> >
>
> Well, this caveat had never occured to me. So how does someone enter
> strings with enclosed apostrophes, as in the Irish surname O'Mallory or
> the Yemeni placename Sana'a?
>
> Gary
>
>
**************************************************************************
> * Gary B. Hoffman, Computing Services Manager e-mail: ghoffman(at)ucsd(dot)edu
*
> * Graduate School of International Relations and Pacific Studies (IR/PS)
*
> * University of California, San Diego (UCSD) voice: (858) 534-1989
*
> * 9500 Gilman Dr. MC 0519 fax: (858) 534-3939
*
> * La Jolla, CA 92093-0519 USA web: http://www-irps.ucsd.edu/
*
>
**************************************************************************
>
>

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Mitch Vincent 2001-06-14 22:57:43 Re: Re(2): Test (fwd)
Previous Message Adam Lang 2001-06-14 17:28:35 Re: Re(2): Test (fwd)