]> granicus.if.org Git - php/commitdiff
- MFB: Changed while loop in php_sybase_fetch_result_row() to also read rows with
authorTimm Friebe <thekid@php.net>
Sat, 8 Nov 2008 12:06:08 +0000 (12:06 +0000)
committerTimm Friebe <thekid@php.net>
Sat, 8 Nov 2008 12:06:08 +0000 (12:06 +0000)
  retcode == CS_ROW_FAIL.
# Reported by Detlef Neumerkel and Frank Irnich of Sybase

ext/sybase_ct/php_sybase_ct.c

index 3f07943afbecb41b88800a94d168050e4dab9f2a..9b459a27ff2267e85082253b6b6019841781a4e3 100644 (file)
@@ -1143,7 +1143,7 @@ static int php_sybase_fetch_result_row (sybase_result *result, int numrows)
        }
        
        if (numrows!=-1) numrows+= result->num_rows;
-       while ((retcode=ct_fetch(result->sybase_ptr->cmd, CS_UNUSED, CS_UNUSED, CS_UNUSED, NULL))==CS_SUCCEED) {
+       while ((retcode=ct_fetch(result->sybase_ptr->cmd, CS_UNUSED, CS_UNUSED, CS_UNUSED, NULL))==CS_SUCCEED || retcode == CS_ROW_FAIL) {
                result->num_rows++;
                i= result->store ? result->num_rows- 1 : 0;
                if (i >= result->blocks_initialized*SYBASE_ROWS_BLOCK) {