On Tue, 2005-05-17 at 13:15, Postgres Admin wrote:
> Hi
> 
> 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,
> 
> Thanks,
> J
> 
> 
> 
> INSERT INTO sample.users (user_name, first_name) VALUES 
> ('jokers', '=ÃÂiF!Â6(ÃÅÃÂÃËÃâ'-IwâiDÃiJÃÃâ %')
> 
> Warning: pg_query() [function.pg-query]: Query failed: ERROR: 
> unterminated quoted string at or near "'=ÃÂi" at character 68 in 
> /usr/local/apache2/htdocs/php/5/Theirry_DB.php on line 162

Use a bytea field and use pg_escape_bytea() to prepare the data for
insertion.

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

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

Reply via email to