[thelist] Re: Adjusting strings for SQL

Jerry Scannell JerryScannell at cox.net
Tue Jul 15 17:50:42 CDT 2003


Ari,

As to your last point, If you were dealing with a keyword you wouldn't do
the character replacement thing.

As far as usuing " etc, how do you handle the problem when it's data in
a database table??  That's what the original problem is based on.

Jerry

----- Original Message -----
From: "Aredridel" <aredridel at nbtsc.org>
To: <thelist at lists.evolt.org>
Sent: Monday, July 14, 2003 10:13 PM
Subject: Re: [thelist] Re: Adjusting strings for SQL


> On Mon, 2003-07-14 at 19:29, Jerry Scannell wrote:
> > This may sound like a "kluge", but what I do is change the apostrophes
to `
> > (I call it the backwards apostrophe since I don't know it's proper name.
It
> > is found next to the 1 key.
>
> Single backquote, or "backtick" as it's known.
>
> >
> > I, too, have always struggled with the double quote as a string
delimiter,
> > and an apostrophe as an allowable alternative.  What do you do when the
> > apostrophe is part of the data.
>
> You use entities, that's what. <grin>.  " becomes &quot; and ' becomes
> &#37;.  On the SQL side, you escape with backslashes or doubling as the
> server you use requires:  ' -> \', and " -> \"
>
> > My kluge takes care of it and nobody ever
> > really notices.  For instance, O'Neil and O`Neil look almost identical.
>
> And then someone tries to search for it and fails, and search engines
> index it differently, quite possibly.
>
> Ari
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> Evolt.org conference in London, July 25-27 2003.  Register today at
http://evolt.org.uk
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !




More information about the thelist mailing list