SYNOPSIS

\*(T<#include <opendbx/api.h>\*(T>

\*(T<uint64_t odbx_rows_affected\*(T> \kx \*(T<(odbx_result_t* result);\*(T>

DESCRIPTION

Returns the number of rows that have been changed by the current statement whose result set was retrieved by \*(T<odbx_result\*(T>(). Affected rows are only returned for DELETE, INSERT or UPDATE statements and their concrete number depends on the database implementation. Instead returning the number of rows which are matched by the WHERE clause, MySQL for example does only count the rows whose values have really been changed.

The \*(T<result\*(T> parameter required by this function must be a valid result set returned by \*(T<odbx_result\*(T>() and must not has been feed to \*(T<odbx_result_finish\*(T>() before.

RETURN VALUE

\*(T<odbx_rows_affected\*(T>() returns the number of changed rows on success and zero if the database server didn't alter any rows. A value of zero can be returned if the statement doesn't match any rows. Some database server like MySQL may return a lower number than expected because they doesn't modify records whose values wouldn't change.

ERRORS

This function will also return zero if the \*(T<result\*(T> parameter is invalid.

RELATED TO odbx_rows_affected…

\*(T<odbx_result\*(T>(), \*(T<odbx_result_finish\*(T>()