X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6D65D8B9E8B for ; Tue, 22 Feb 2005 13:38:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63025-08 for ; Tue, 22 Feb 2005 13:38:09 +0000 (GMT) Received: from mout.perfora.net (mout.perfora.net [217.160.230.41]) by svr1.postgresql.org (Postfix) with ESMTP id E88338B9EA2 for ; Tue, 22 Feb 2005 13:38:10 +0000 (GMT) Received: from ool-182c7886.dyn.optonline.net[24.44.120.134] (helo=[192.168.2.18]) by mrelay.perfora.net with ESMTP (Nemesis), id 0MKz5u-1D3aEr1wem-00069A; Tue, 22 Feb 2005 08:38:09 -0500 Mime-Version: 1.0 (Apple Message framework v619.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: pgsql-php@postgresql.org From: Matthew Terenzio Subject: Fwd: From MySQL to PostgreSQL Date: Tue, 22 Feb 2005 08:38:09 -0500 X-Mailer: Apple Mail (2.619.2) X-Provags-ID: perfora.net abuse@perfora.net login:55dcc513cc7db400396c2523adeeb8ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/23 X-Sequence-Number: 2997 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 >