summaryrefslogtreecommitdiff
path: root/ext/fbsql/php_fbsql.c
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2001-10-29 21:40:48 +0000
committerFrank M. Kromann <fmk@php.net>2001-10-29 21:40:48 +0000
commit8b0ac98fe45ecdb01a58cee8c16b9eb8882d5d32 (patch)
tree8503b2fdfda6a29e408dde3510a4006e1bb69978 /ext/fbsql/php_fbsql.c
parentfc412af04aedff7d4e1f98b6492861aac435de88 (diff)
downloadphp-git-8b0ac98fe45ecdb01a58cee8c16b9eb8882d5d32.tar.gz
A more acurate fix to the fbsql_num_rows function returning
x7fffffff when the server is unable to tell the number of rows.
Diffstat (limited to 'ext/fbsql/php_fbsql.c')
-rw-r--r--ext/fbsql/php_fbsql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c
index e50f688f79..b6668fa344 100644
--- a/ext/fbsql/php_fbsql.c
+++ b/ext/fbsql/php_fbsql.c
@@ -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);