Re: escape single quote in INSERT command - Mailing list pgsql-sql

From
Subject Re: escape single quote in INSERT command
Date
Msg-id 47269.203.145.129.4.1038335486.squirrel@mail.trade-india.com
Whole thread Raw
In response to escape single quote in INSERT command  (dave_h4@yahoo.com (Hunter))
Responses Re: escape single quote in INSERT command  ("Dan Langille" <dan@langille.org>)
Re: escape single quote in INSERT command  (Thomas Good <tomg@q8.nrnet.org>)
List 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/




pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Are sub-select error suppressed?
Next
From: "Dan Langille"
Date:
Subject: Re: escape single quote in INSERT command