]> granicus.if.org Git - php/commitdiff
MFB
authorfoobar <sniper@php.net>
Thu, 28 Aug 2003 16:19:08 +0000 (16:19 +0000)
committerfoobar <sniper@php.net>
Thu, 28 Aug 2003 16:19:08 +0000 (16:19 +0000)
ext/sybase_ct/php_sybase_ct.c

index 6e9b17018623ca579e74abcb4366301178e71384..7404474dac0e1abbe3744061e294b8ce61bd0d4f 100644 (file)
@@ -1384,8 +1384,21 @@ static void php_sybase_query (INTERNAL_FUNCTION_PARAMETERS, int buffered)
                                        case CS_CURSOR_RESULT:
                                        case CS_PARAM_RESULT:
                                        case CS_ROW_RESULT:
-                                               /* Unexpected results, cancel them. */
+                                               if (status != Q_RESULT) {
+                                                       result = php_sybase_fetch_result_set(sybase_ptr, buffered, store);
+                                                       if (result == NULL) {
+                                                               ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_ALL);
+                                                               sybase_ptr->dead = 1;
+                                                               RETURN_FALSE;
+                                                       }
+                                                       status = Q_RESULT;
+                                               } else {
+                                                       /* Unexpected results, cancel them. */
+                                                       ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT);
+                                               }
+                                               break;
                                        case CS_STATUS_RESULT:
+                                               /* Unexpected results, cancel them. */
                                                ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT);
                                                break;