From: | Mariusz Pękala <skoot(at)qi(dot)pl> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: From MySQL to PostgreSQL |
Date: | 2005-02-22 11:48:16 |
Message-ID: | 20050222114816.GB18450@lisa.tutaj |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
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()
From | Date | Subject | |
---|---|---|---|
Next Message | Zouari Fourat | 2005-02-22 12:27:37 | PostgreSQL encoding |
Previous Message | Zouari Fourat | 2005-02-22 11:07:39 | From MySQL to PostgreSQL |