]> granicus.if.org Git - php/commitdiff
Fix for PECL #5433 (rowCount() not set)
authorWez Furlong <wez@php.net>
Fri, 30 Sep 2005 04:19:24 +0000 (04:19 +0000)
committerWez Furlong <wez@php.net>
Fri, 30 Sep 2005 04:19:24 +0000 (04:19 +0000)
ext/pdo_odbc/odbc_stmt.c

index 60bddb4383de88db681ca9b6dfd2af23b123d225..803aa5d3f1438ec11868822bb9b5ea6881f8bfd7 100755 (executable)
@@ -69,6 +69,7 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
        RETCODE rc;
        pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
        char *buf = NULL;
+       long row_count = -1;
 
        if (stmt->executed) {
                SQLCloseCursor(S->stmt);
@@ -133,6 +134,9 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
                        return 0;
        }
 
+       SQLRowCount(S->stmt, &row_count);
+       stmt->row_count = row_count;
+
        if (!stmt->executed) {
                /* do first-time-only definition of bind/mapping stuff */
                SQLSMALLINT colcount;