Efficient string manipulation , Help please

Aahz Maruch aahz at netcom.com
Thu Jul 8 13:08:12 EDT 1999


In article <37856BF1.BD046003 at freenet.co.uk>,
Sreekant Kodela  <sreekantk at freenet.co.uk> wrote:
>
>I seem to be in trouble here. I am trying to make some cgi scripts for
>my web site. I am using the postgresql as the backend db and a form
>based address book and news forum etc. The problem is everything is
>working ok as long as noone uses ' and " in the text. If they do, bingo
>, postgres refuses to accept. I tried using string library [mainly
>string.join(string.split('awkward'"'st'ring')). It works sometimes and
>doesn't some times.

It has problems with *both* ' and "?  IME with MS SQL Server, you should
only have problems with one of them.  In our code, we replace each
instance of "'" with "''".
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list