summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2006-04-30 01:27:33 +0000
committerWez Furlong <wez@php.net>2006-04-30 01:27:33 +0000
commit07e11dcc4d9be59a364530d24d302a5634321791 (patch)
tree72f60b5f352e9a580b73c735afd354356e7af7ab /ext/pdo_odbc
parentaa5dbc8c9263b53b646980998e1d2eea03323f37 (diff)
downloadphp-git-07e11dcc4d9be59a364530d24d302a5634321791.tar.gz
Fix #36632
Diffstat (limited to 'ext/pdo_odbc')
-rwxr-xr-xext/pdo_odbc/odbc_driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 8309b23a5a..5585cecf38 100755
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -234,6 +234,14 @@ static long odbc_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRML
rc = SQLExecDirect(stmt, (char *)sql, sql_len);
+ if (rc == SQL_NO_DATA) {
+ /* If SQLExecDirect executes a searched update or delete statement that
+ * does not affect any rows at the data source, the call to
+ * SQLExecDirect returns SQL_NO_DATA. */
+ row_count = 0;
+ goto out;
+ }
+
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
pdo_odbc_doer_error("SQLExecDirect");
goto out;