Re: escape single quote in INSERT command

From: <mallah(at)trade-india(dot)com>
To: <dave_h4(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: escape single quote in INSERT command
Date: 2002-11-26 18:31:26
Message-ID: 47269.203.145.129.4.1038335486.squirrel@mail.trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> Hi Group -
>
> I have a perl application for a registration form.

Same Here,

Why dont' you use prepare and execute in case you are using DBI
same program is like this.

$dbh = DBI -> connect ( "......");
$sth = $dbh -> prepare("insert into tab (a,b) values (?,?)");
$sth -> execute($a , $b );
$sth -> finish();
$dbh -> commit();
$dbh -> disconnect();

regds
mallah.

I'd like to put escape characters in my
> insert command to accommodate for '
> (i.e. O'Brien, O'Malley, etc). I've tired double quotes, single
> quotes, back tick, forward ticks, curly bracket, round brackets - no success.
>
>
> Thanks, dave
>
> ---------------------------(end of broadcast)--------------------------- TIP 6: Have you
> searched our list archives?
>
> http://archives.postgresql.org

-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Good 2002-11-26 18:41:42 Re: escape single quote in INSERT command
Previous Message Thomas Good 2002-11-26 18:23:53 Re: escape single quote in INSERT command