From: | Matthew Terenzio <matt(at)jobsforge(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Fwd: From MySQL to PostgreSQL |
Date: | 2005-02-22 13:38:09 |
Message-ID: | ca7cf34386a2f595dd0becac5af9f0c2@jobsforge.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Ellingson | 2005-02-23 20:24:17 | permission problems |
Previous Message | Christopher Kings-Lynne | 2005-02-22 13:32:54 | Re: PostgreSQL encoding |