Re: inserting bytea using PHPs pg_escape_bytea() - Mailing list pgsql-general

From Martín Marqués
Subject Re: inserting bytea using PHPs pg_escape_bytea()
Date
Msg-id CABeG9LtZ+4QvYDX17=AwEL3sonhtXWu6ARZTWp++xOBHXvWBGw@mail.gmail.com
Whole thread Raw
In response to Re: inserting bytea using PHPs pg_escape_bytea()  (Rodrigo Gonzalez <rjgonzale@estrads.com.ar>)
List pgsql-general
El día 20 de octubre de 2011 14:28, Rodrigo Gonzalez
<rjgonzale@estrads.com.ar> escribió:
> El 20/10/11 14:13, Martín Marqués escribió:
>
> El día 19 de octubre de 2011 23:20, Jeff Davis <pgsql@j-davis.com> escribió:
>
> On Wed, 2011-10-19 at 14:30 -0300, Martín Marqués wrote:
>
> The only concern I have is that on insertion, I get this WARNING:
>
> WARNING:  nonstandard use of \\ in a string literal at character 41
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
>
> Should I worry? What does it mean?
>
> First of all, the best solution is to use parameterized queries:
>
> http://us.php.net/manual/en/function.pg-query-params.php
>
> How would that work with abstraction layers like MDB2 or PDO?
>
> With PDO just check http://www.php.net/manual/en/pdo.prepare.php

AFAIK, that's not the same as pg_query_params.

Thats more like pg_prepare() + pg_execute().

I use it a lot with MDB2, but couldn't find something like pg_query_params()

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql - FDW, ForeignScanState and subqueries
Next
From: Jeff Davis
Date:
Subject: Re: inserting bytea using PHPs pg_escape_bytea()