Re: From MySQL to PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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()

Attachment: pgpVwtf6l6c8X.pgp
Description: PGP signature


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux