Re: parsing html in pgsql using php

Поиск
Список
Период
Сортировка
Искать
От
David C. Brown
Тема
Re: parsing html in pgsql using php
Дата
Msg-id
3D64EFE3.1060804@centennialwines.com
Список
Дерево обсуждения
Re: parsing html in pgsql using php Roj Niyogi <niyogi@pghoster.com>
You need to escape your apostrophes.  Your query statment uses 
apostrophes and you have them in the string that your inserting into the db.

I believe you can use addslashes() and stripslashes() to help you with this.

http://www.php.net/manual/en/function.addslashes.php

Dave

Clio wrote:

>Subject ... how to?
>
>here is an example:
>
>
>
>$tmp = "
>
>
> 
>
> Sample text in table. >
> >"; > >pg_connect("host=localhost dbname=daatabase user=web_user password=password"); > >pg_query("insert into site_common values ('01','00','".$tmp."')"); > > >?> > > >Here is an error: > > >Warning: pg_query() query failed: ERROR: parser: parse error at or near "175" in /w/devel/test/dbinsert.php on line 80 > > >Any ideas? > > >/ Clio > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > >
В списке pgsql-php по дате отправления
От: Clio
Дата:
От: Roj Niyogi
Дата:
FAQ