Fix: PostgreSQL's GetAffectedRows() function always returned 0.

Fixes #5628
This commit is contained in:
Gunnar Beutner 2014-02-10 10:25:12 +01:00
parent 663f72300b
commit 5242a86e2f
1 changed files with 3 additions and 3 deletions

View File

@ -255,6 +255,9 @@ IdoPgsqlResult IdoPgsqlConnection::Query(const String& query)
<< errinfo_database_query(query)
);
char *rowCount = PQcmdTuples(result);
m_AffectedRows = atoi(rowCount);
if (PQresultStatus(result) == PGRES_COMMAND_OK)
return IdoPgsqlResult();
@ -269,9 +272,6 @@ IdoPgsqlResult IdoPgsqlConnection::Query(const String& query)
);
}
char *rowCount = PQcmdTuples(result);
m_AffectedRows = atoi(rowCount);
return IdoPgsqlResult(result, std::ptr_fun(PQclear));
}