]> granicus.if.org Git - php/commitdiff
A more acurate fix to the fbsql_num_rows function returning
authorFrank M. Kromann <fmk@php.net>
Mon, 29 Oct 2001 21:40:48 +0000 (21:40 +0000)
committerFrank M. Kromann <fmk@php.net>
Mon, 29 Oct 2001 21:40:48 +0000 (21:40 +0000)
x7fffffff when the server is unable to tell the number of rows.

ext/fbsql/php_fbsql.c

index e50f688f790ee4f35e26730fb0163605cb280d03..b6668fa34405847fd5222949a4d203a9efa636a3 100644 (file)
@@ -467,7 +467,7 @@ PHP_MINFO_FUNCTION(fbsql)
 
 /*
        sprintf(buf, "%ld", FB_SQL_G(resultCount));
-       php_info_print_table_row(2, "Active Links", buf);
+       php_info_print_table_row(2, "Active Results", buf);
 */
 
        php_info_print_table_end();
@@ -639,7 +639,7 @@ int phpfbFetchRow(PHPFBResult* result, int row)
        for (;;)
        {
                void *rawData; 
-               if (row > result->rowCount) return 0;
+               if (row >= result->rowCount && row != 0x7fffffff) return 0;
                if (fbcrhRowCount(result->rowHandler) > (unsigned int)row) return 1;
                rawData = fbcdcFetch(result->link->connection, result->batchSize, result->fetchHandle);
                if (!fbcrhAddBatch(result->rowHandler, rawData)) result->rowCount = fbcrhRowCount(result->rowHandler);