Yasuo,

this actually raises a point I've been meening to ask you about.

Is there any chance you can make the second argument optional?
This makes it easier to write db classes, which are interchangeable between 
mysql and pgsql.

I think It currently can be done in php, but you'd need to make an array of 
resultsets, which
keep a static variable or object property for the last retrieved row PER 
resultset and that gets messy.

However - letting C handle this, is much faster. Problem is: it would break 
BC unless something
really smart is cooked up, as currently the third argument is optional and 
PGSQL_* constants
are integers (if you changed them to chars, it would only break scripts 
that interpret these constant
values instead of the constants themselves, which I think is rare).

Basically, what it boils down to is: are all db extensions *_fetch_array 
gonna be named and act the
same and if so, what is the target to do this, before or with PHP-5?

At 10:52 28-7-2002 +0000, [EMAIL PROTECTED] wrote:
>  ID:               18417
>  Updated by:       [EMAIL PROTECTED]
>  Reported By:      [EMAIL PROTECTED]
>-Status:           Open
>+Status:           Bogus
>  Bug Type:         PostgreSQL related
>  Operating System: freebsd-latest
>  PHP Version:      4.1.2
>  New Comment:
>
>Sorry, but the bug system is not the appropriate forum for asking
>support questions. Your problem does not imply a bug in PHP itself.
>For a list of more appropriate places to ask for help using PHP,
>please visit http://www.php.net/support.php
>
>Thank you for your interest in PHP.
>
>If you ask php-general, someone may answer. Try 4.2.x or later if you
>would like, there are many new useful functions.
>
>
>
>Previous Comments:
>------------------------------------------------------------------------
>
>[2002-07-18 14:48:43] [EMAIL PROTECTED]
>
>pg_fetch_array says this
>"Unable to jump to row 0 on PostgreSQL result index"
>when the query returns no results.
>
>How is one suppose to Get an ASSOC array with using @ infront of the
>function and not getting an error when the query has no results?
>
>$tmp = pg_fetch_array($results,0,PGSQL_ASSOC);
>
>
>
>------------------------------------------------------------------------
>
>
>--
>Edit this bug report at http://bugs.php.net/?id=18417&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to