Home > Archive > PHP with PostgreSQL > May 2005 > Re: ERROR: unterminated quoted string... help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: ERROR: unterminated quoted string... help
Volkan YAZICI

2005-05-18, 3:24 am

Hi,

On 5/17/05, Postgres Admin < postgres@productivit
ymedia.com> wrote:
> I'm trying to insert encrypted data into the database and I'm noticing
> error dealing with quotes. Below is the error print out...
>
> suggestions and/or at least point me in the direction to find a solution,
>
> INSERT INTO sample.users (user_name, first_name) VALUES
> ('jokers', '=ïµiF!¶6(ÖŸ
¾óˆÌ''-Iw‰iDÖiJÐÿ_ %')

If you don't use parameters, you need to escape the data to place in
an SQL query command. But this may cost so much on the CPU and RAM
side if your will be escaped data is enough long to exhaust other
processes. (For example, it's not so feasible to unescape a media file
while inserting.)

At the moment, current stable releases of PHP doesn't support
parameter usage, but it was committed to CVS in revision 1.315. If
you'll need these kind of escape functions so much, I'd encourage you
to patch your php/ext/pgsql/pgsql.c with the one in CVS tree. After
patch, you'll be able to use pg_query_params, pg_prepare, pg_execute,
pg_send_query_params
and pg_send_prepare; namely, every possible
parameter supported function.

Regards.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com