You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
38 lines
1.3 KiB
Groff
38 lines
1.3 KiB
Groff
.\" Automatically generated by Pandoc 3.5
|
|
.\"
|
|
.TH "mysql_stmt_affected_rows" "3" "" "Version 3.3" "MariaDB Connector/C"
|
|
.SS Name
|
|
mysql_stmt_affected_rows \- Returns the number of affected rows from
|
|
previous executed prepared statement
|
|
.SS Synopsis
|
|
.IP
|
|
.EX
|
|
#include \f[B]<mysql.h>\f[R]
|
|
|
|
my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
|
|
.EE
|
|
.SS Description
|
|
Returns the number of affected rows by the last prepared statement
|
|
associated with mysql, if the operation was an \[lq]upsert\[rq] (INSERT,
|
|
UPDATE, DELETE or REPLACE) statement, or \-1 if the last prepared
|
|
statement failed.
|
|
.SS Parameter
|
|
.IP \[bu] 2
|
|
\f[CR]stmt\f[R] \- a statement handle, which was previously allocated by
|
|
[mysql_stmt_init()](mysql_stmt_init().]]
|
|
.SS Notes
|
|
.IP \[bu] 2
|
|
When using \f[CR]UPDATE\f[R], MariaDB will not update columns where the
|
|
new value is the same as the old value.
|
|
This creates the possibility that \f[CR]mysql_stmt_affected_rows()\f[R]
|
|
may not actually equal the number of rows matched, only the number of
|
|
rows that were literally affected by the query.
|
|
.IP \[bu] 2
|
|
The \f[CR]REPLACE\f[R] statement first deletes the record with the same
|
|
primary key and then inserts the new record.
|
|
This function returns the number of deleted records in addition to the
|
|
number of inserted records.
|
|
.SS See Also
|
|
.IP \[bu] 2
|
|
\f[B]mysql_stmt_insert_id(3)\f[R]
|