Home » Database » MDB » Bug #740
before 4.3.0 release, pg_fetch_assoc isn't work
Details
| Submitted | 2004-02-12 09:02 UTC |
|---|---|
| From | shota at dino dot co dot jp |
| Assigned | lsmith |
| Status | Closed |
| Package | MDB |
| PHP Version | 4.2.2 |
| OS | linux |
| 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);
> }