#31750 [Opn->Fbk]: pg_fetch_array fails if PGSQL_ASSOC is specified
| From: | tony2001@php.net | Date: | Sat, 29 Jan 2005 19:34:51 +0000 |
| Subject: | #31750 [Opn->Fbk]: pg_fetch_array fails if PGSQL_ASSOC is specified | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73035@lists.php.net to get a copy of this message | ||
ID: 31750
Updated by: tony2001@php.net
Reported By: mancini at nextcode dot org
-Status: Open
+Status: Feedback
Bug Type: PostgreSQL related
Operating System: windows 2000
PHP Version: 5.0.3
New Comment:
Can't reproduce with 5.0.3 & PG 7.3.6 under Linux.
Please provide more info.
Previous Comments:
------------------------------------------------------------------------
[2005-01-29 09:29:30] mancini at nextcode dot org
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 this bug report at http://bugs.php.net/?id=31750&edit=1