GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
mysql_stmt_affected_rows(3) MariaDB Connector/C mysql_stmt_affected_rows(3)

mysql_stmt_affected_rows - Returns the number of affected rows from previous executed prepared statement


#include <mysql.h>
my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);

    

Returns the number of affected rows by the last prepared statement associated with mysql, if the operation was an “upsert” (INSERT, UPDATE, DELETE or REPLACE) statement, or -1 if the last prepared statement failed.

stmt - a statement handle, which was previously allocated by [mysql_stmt_init()](mysql_stmt_init().]]

When using UPDATE, MariaDB will not update columns where the new value is the same as the old value. This creates the possibility that mysql_stmt_affected_rows() may not actually equal the number of rows matched, only the number of rows that were literally affected by the query.
The REPLACE 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.

mysql_stmt_insert_id(3)
Version 3.2.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.