summaryrefslogtreecommitdiffstats
path: root/libmariadb/man/mysql_affected_rows.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /libmariadb/man/mysql_affected_rows.3
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/man/mysql_affected_rows.3')
-rw-r--r--libmariadb/man/mysql_affected_rows.346
1 files changed, 46 insertions, 0 deletions
diff --git a/libmariadb/man/mysql_affected_rows.3 b/libmariadb/man/mysql_affected_rows.3
new file mode 100644
index 00000000..c408ed78
--- /dev/null
+++ b/libmariadb/man/mysql_affected_rows.3
@@ -0,0 +1,46 @@
+.\" Automatically generated by Pandoc 2.5
+.\"
+.TH "mysql_affected_rows" "3" "" "Version 3.3.1" "MariaDB Connector/C"
+.hy
+.SS Name
+.PP
+mysql_affected_rows \- returns the number of rows affected by the last
+operation
+.SS Synopsis
+.IP
+.nf
+\f[C]
+#include <mysql.h>
+
+my_ulonglong mysql_affected_rows(MYSQL * mysql);
+\f[R]
+.fi
+.SS Description
+.PP
+Returns the number of affected rows by the last operation associated
+with mysql, if the operation was an \[lq]upsert\[rq] (\f[C]INSERT\f[R],
+\f[C]UPDATE\f[R], \f[C]DELETE\f[R] or \f[C]REPLACE\f[R]) statement, or
+\-1 if the last operation failed.
+.SS Parameters:
+.PP
+\f[C]mysql\f[R] is a connection identifier, which was previously
+allocated by \f[B]mysql_init(3)\f[R] and connected by
+\f[B]mysql_real_connect(3)\f[R].
+.SS Notes:
+.IP \[bu] 2
+When using \f[C]UPDATE\f[R], MariaDB will not update columns where the
+new value is the same as the old value.
+This creates the possibility that mysql_affected_rows 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[C]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.
+.SH Return value
+.PP
+Returns the number of affected rows or \-1 on error.
+.SS See also
+.IP \[bu] 2
+\f[B]mysql_num_rows(3)\f[R]