PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB » Bug #740

before 4.3.0 release, pg_fetch_assoc isn't work

Details

Submitted2004-02-12 09:02 UTC
Fromshota at dino dot co dot jp
Assignedlsmith
StatusClosed
PackageMDB
PHP Version4.2.2
OSlinux
Roadmaps(Not assigned)

Comments

[2004-02-12 09:02 UTC] shota at dino dot co dot jp

Description:
------------
before 4.3.0 release, pg_fetch_assoc isn't work in pgsql.php
rpm of redhat9 is php4.2.2,
therfore i change the code like this.
becauseof '@', thereis no output and i made trouble with discover this issue.

Reproduce code:
---------------
1242,1243c1242,1248
< if ($fetchmode & MDB_FETCHMODE_ASSOC) {
< $row = @pg_fetch_assoc($result);
---
> if ($fetchmode & MDB_FETCHMODE_ASSOC ) {
> if (function_exists('pg_fetch_assoc')) {
> $row = @pg_fetch_assoc($result);
> } else {
> $row = @pg_fetch_array($result);
> }
>
1253c1258,1262
< $row = @pg_fetch_assoc($result, $rownum);
---
> if (function_exists('pg_fetch_assoc')) {
> $row = @pg_fetch_assoc($result, $rownum);
> } else {
> $row = @pg_fetch_array($result, $rownum);
> }