Re: escape single quote in INSERT command

Поиск
Список
Период
Сортировка
От Dan Langille
Тема Re: escape single quote in INSERT command
Дата
Msg-id 3DE37B68.8450.D898B9D8@localhost
обсуждение исходный текст
Ответ на Re: escape single quote in INSERT command  (<mallah@trade-india.com>)
Список pgsql-sql
On 27 Nov 2002 at 0:01, mallah@trade-india.com wrote:

> > 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();

IIRC, there is a dbi->quote() function as well.  That should properly 
escape anything.
-- 
Dan Langille : http://www.langille.org/



В списке pgsql-sql по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: escape single quote in INSERT command
Следующее
От: Thomas Good
Дата:
Сообщение: Re: escape single quote in INSERT command