Browse Source

Fix for PECL #5433 (rowCount() not set)

PHP-5.1
Wez Furlong 21 years ago
parent
commit
69f0675a35
  1. 4
      ext/pdo_odbc/odbc_stmt.c

4
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;

Loading…
Cancel
Save