From: Mariusz Pękala <skoot@qi.pl>
To: pgsql-php@postgresql.org
Subject: Re: From MySQL to PostgreSQL
Date: Tue, 22 Feb 2005 12:48:16 +0100
Message-ID: <20050222114816.GB18450@lisa.tutaj> (raw)
In-Reply-To: <621eda8a05022203075252d65@mail.gmail.com>
References: <621eda8a05022203075252d65@mail.gmail.com>
On 2005-02-22 12:07:39 +0100 (Tue, Feb), 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 ?
You should test. :-)
I believe (I should test too) that it is faster, but with _large_ data sets
you will use a lot of memory, so things will slow down or break.
For known small results (SELECT ... LIMIT ..) why not.
> *> how to avoid sql injections, should i use the same methods with
> mysql ? (addslashes)
No, you should use pg_escape_string()
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: skoot@qi.pl
Subject: Re: From MySQL to PostgreSQL
In-Reply-To: <20050222114816.GB18450@lisa.tutaj>
References: <621eda8a05022203075252d65@mail.gmail.com> <20050222114816.GB18450@lisa.tutaj>
* 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