#31750 [NEW]: pg_fetch_array fails if PGSQL_ASSOC is specified
| From: | mancini at nextcode dot org | Date: | Sat, 29 Jan 2005 08:29:31 +0000 |
| Subject: | #31750 [NEW]: pg_fetch_array fails if PGSQL_ASSOC is specified | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-73022@lists.php.net to get a copy of this message | ||
From: mancini at nextcode dot org
Operating system: windows 2000
PHP version: 5.0.3
PHP Bug Type: PostgreSQL related
Bug description: pg_fetch_array fails if PGSQL_ASSOC is specified
Description:
------------
Tested with original php_pgsql 7.4 binary distribution on php 5.0.3
distribution
The function fails every time if PGSQL_ASSOC is specified to
pg_fetch_array
It works fine if that is not specified , and pg_fetch_assoc() works too
btw , furthermore mysql_fetch_assoc() with MYSQL_ASSOC works too
And quite disturbing looking for the error message on google
http://www.google.com/search?hl=en&lr=&q=%22Unable+to+jump+to+row+1+on+PostgreSQL+result+index%22
gives about 2,620 results of pages experiencing it
Reproduce code:
---------------
$query = "SELECT usename,passwd,usesuper FROM pg_user";
$result = pg_query($query);
while ($line = pg_fetch_array($result,PGSQL_ASSOC)){
echo $line['usename'];
}
Expected result:
----------------
pgsql
Actual result:
--------------
PHP Warning: pg_fetch_array() Unable to jump to row 1 on PostgreSQL
result index 4 in C:\apache2triad\htdocs\test.pgsql.php on line 4
--
Edit bug report at http://bugs.php.net/?id=31750&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31750&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31750&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31750&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31750&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31750&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31750&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31750&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31750&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31750&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31750&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31750&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31750&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31750&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31750&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31750&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31750&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31750&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31750&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31750&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31750&r=mysqlcfg