Fwd: From MySQL to PostgreSQL

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
>


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Matthew Terenzio [ Di, 22 Februar 2005 14:38 ] [ ID #658969 ]
Datenbanken » gmane.comp.db.postgresql.php » Fwd: From MySQL to PostgreSQL

Vorheriges Thema: permission problems
Nächstes Thema: PostgreSQL encoding