Thread: Fwd: From MySQL to PostgreSQL

Fwd: From MySQL to PostgreSQL

From
Matthew Terenzio
Date:
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
>