Re: INSERT INTO - Mailing list pgsql-sql

From Shavonne Marietta Wijesinghe
Subject Re: INSERT INTO
Date
Msg-id 001201c767b6$40cc2d20$1102a8c0@dream
Whole thread Raw
In response to INSERT INTO  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Responses Re: INSERT INTO
List pgsql-sql
i took a look at the link Guillaume gave me. But it also explains on PHP
i'm using ASP :(


----- Original Message ----- 
From: "Guillaume Lelarge" <guillaume@lelarge.info>
To: "Bart Degryse" <Bart.Degryse@indicator.be>
Cc: <pgsql-sql@postgresql.org>; "Shavonne Marietta Wijesinghe" 
<shavonne.marietta@studioform.it>
Sent: Friday, March 16, 2007 10:16 AM
Subject: Re: [SQL] INSERT INTO


> Bart Degryse a ecrit le 16/03/2007 10:03:
>> I don't use ASP but in PHP I would do something in the line of
>>  $valuetoinsert = "SANT'ANGELO LODIGIANO";
>> $query = "INSERT INTO TABLE2 (TE_INDI) VALUES ('" . str_replace("'", 
>> "''", $valuetoinsert) . "')";
>>  I'm sure ASP has also a string replacement function
>>
>
> This doesn't answer Shavonne's question but, instead of str_replace, you 
> should better use pg_escape_string :
>   http://www.php.net/manual/en/function.pg-escape-string.php
>
> Regards.
>
>
> -- 
> Guillaume. 



pgsql-sql by date:

Previous
From: "Shavonne Marietta Wijesinghe"
Date:
Subject: Fw: INSERT INTO
Next
From: Wiebe Cazemier
Date:
Subject: Re: Joins on many-to-many relations.