pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew Terenzio <matt@jobsforge.com>
To: pgsql-php@postgresql.org
Subject: Fwd: From MySQL to PostgreSQL
Date: Tue, 22 Feb 2005 08:38:09 -0500
Message-ID: <ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com> (raw)


On Feb 22, 2005, at 6:07 AM, Zouari Fourat wrote:

> Am just migrating from mysql db to pgsql db, an want to ask about some
> clarifications on the php pgsql api :
>
> *> is pg_fetch_all faster than iterating with pg_fetch_assoc ?
I think you should be fine with it. According to the manual, 
pg_fect_assoc() is NOT significantly slower than pg_fetch_row.

> *> how to avoid sql injections, should i use the same methods with
> mysql ? (addslashes)

You should use pg_escape_string(), not addslashes.


>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>




view thread (3+ messages)

Message-ID: <ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com>
Permalink:  ../ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com/
Also on:    postgresql.org/message-id/ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: matt@jobsforge.com
  Subject: Re: Fwd: From MySQL to PostgreSQL
  In-Reply-To: <ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com>
  References: <ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox