summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-09-30 04:19:24 +0000
committerWez Furlong <wez@php.net>2005-09-30 04:19:24 +0000
commit69f0675a35265f5ee2c3871370d91dc1887e0f85 (patch)
tree77b5f170e484648829a86b77316c08d2e16c27c2
parentb47525e508e9b09d5de65a00429028c3a4df3597 (diff)
downloadphp-git-69f0675a35265f5ee2c3871370d91dc1887e0f85.tar.gz
Fix for PECL #5433 (rowCount() not set)
-rwxr-xr-xext/pdo_odbc/odbc_stmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 60bddb4383..803aa5d3f1 100755
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -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;