Why not leave it out then? It's new, it's not (yet) in any release, etc.
    If you leave it in, people WILL try to use it and as they DO NOT read
    sources in most cases, they will submit bug reports about the function
    not working as they expect. (yes, even if it's not documented..)
    
    --Jani
    

On Sat, 16 Aug 2003, Ard Biesheuvel wrote:

>abies          Fri Aug 15 20:58:24 2003 EDT
>
>  Modified files:              
>    /php-src/ext/interbase     interbase.c 
>  Log:
>  Added comment about ibase_num_rows()
>  
>Index: php-src/ext/interbase/interbase.c
>diff -u php-src/ext/interbase/interbase.c:1.143 
>php-src/ext/interbase/interbase.c:1.144
>--- php-src/ext/interbase/interbase.c:1.143    Fri Aug 15 12:13:51 2003
>+++ php-src/ext/interbase/interbase.c  Fri Aug 15 20:58:24 2003
>@@ -18,7 +18,7 @@
>    +----------------------------------------------------------------------+
>  */
> 
>-/* $Id: interbase.c,v 1.143 2003/08/15 16:13:51 abies Exp $ */
>+/* $Id: interbase.c,v 1.144 2003/08/16 00:58:24 abies Exp $ */
> 
> /*
>       Changes:
>@@ -727,7 +727,7 @@
> 
>       php_info_print_table_start();
>       php_info_print_table_row(2, "Interbase Support", "enabled");
>-      php_info_print_table_row(2, "Revision", "$Revision: 1.143 $");
>+      php_info_print_table_row(2, "Revision", "$Revision: 1.144 $");
> #ifdef COMPILE_DL_INTERBASE
>       php_info_print_table_row(2, "Dynamic Module", "Yes");
> #endif
>@@ -2248,20 +2248,30 @@
> }
> /* }}} */
> 
>-/* {{{ proto ibase_num_rows( resource result_identifier )
>-   Returns the number of rows in a result */
>+/* {{{ ibase_num_rows( resource result_identifier ) */
> PHP_FUNCTION(ibase_num_rows) 
> {
>       /**
>-       * This function relies on the InterBase API function isc_dsql_sql_info()
>-       * which has a couple of limitations (which I hope will be fixed in
>-       * future releases of Firebird):
>-       * - row count is always zero before the first fetch;
>-       * - row count for SELECT ... FOR UPDATE is broken -> never returns a
>-       *   higher number than the number of records fetched so far;
>-       * - row count for other statements is merely a lower bound on the number
>-       *   of records => calling ibase_num_rows() again after a couple of fetches
>-       *   will most likely return a new (higher) figure for large result sets.
>+       * PLEASE READ THIS FIRST before adding this function to the main PHP
>+       * documentation:
>+       * 
>+       * As this function relies on the InterBase API function isc_dsql_sql_info()
>+       * which has a couple of limitations (which I hope will be fixed in future 
>+       * releases of Firebird), this function is fairly useless. I'm leaving it
>+       * in place for people who can live with the limitations, which I only 
>+       * found out about after I had implemented it anyway.
>+       *
>+       * Currently, there's no way to determine how many rows can be fetched from
>+       * a cursor. The only number that _can_ be determined is the number of rows
>+       * that have already been pre-fetched by the client library. 
>+       * This implies the following:
>+       * - num_rows() always returns zero before the first fetch;
>+       * - num_rows() for SELECT ... FOR UPDATE is broken -> never returns a
>+       *   higher number than the number of records fetched so far (no pre-fetch);
>+       * - the result of num_rows() for other statements is merely a lower bound 
>+       * on the number of records => calling ibase_num_rows() again after a couple
>+       * of fetches will most likely return a new (higher) figure for large result 
>+       * sets.
>        *
>        * 12-aug-2003 Ard Biesheuvel
>        */
>@@ -4088,7 +4098,7 @@
>       zend_list_addref(Z_LVAL_P(return_value));
> }
> 
>-/* {{{ proto bool ibase_free_vevent_handler(resource event)
>+/* {{{ proto bool ibase_free_event_handler(resource event)
>    Frees the event handler set by ibase_set_event_handler() */
> PHP_FUNCTION(ibase_free_event_handler)
> {
>
>
>
>

-- 
https://www.paypal.com/xclick/[EMAIL PROTECTED]&no_note=1&tax=0&currency_code=EUR
 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to