Re: From MySQL to PostgreSQL - Mailing list pgsql-php

From Mariusz Pękala
Subject Re: From MySQL to PostgreSQL
Date
Msg-id 20050222114816.GB18450@lisa.tutaj
Whole thread Raw
In response to From MySQL to PostgreSQL  (Zouari Fourat <fourat@gmail.com>)
List 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()


Attachment

pgsql-php by date:

Previous
From: Zouari Fourat
Date:
Subject: From MySQL to PostgreSQL
Next
From: Zouari Fourat
Date:
Subject: PostgreSQL encoding