From: | Martín Marqués <martin(dot)marques(at)gmail(dot)com> |
---|---|
To: | Rodrigo Gonzalez <rjgonzale(at)estrads(dot)com(dot)ar> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: inserting bytea using PHPs pg_escape_bytea() |
Date: | 2011-10-20 17:43:37 |
Message-ID: | CABeG9LtZ+4QvYDX17=AwEL3sonhtXWu6ARZTWp++xOBHXvWBGw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
El día 20 de octubre de 2011 14:28, Rodrigo Gonzalez
<rjgonzale(at)estrads(dot)com(dot)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(at)j-davis(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2011-10-20 18:10:26 | Re: inserting bytea using PHPs pg_escape_bytea() |
Previous Message | Tom Lane | 2011-10-20 17:31:21 | Re: Postgresql - FDW, ForeignScanState and subqueries |