Reports the number of rows affected by the result’s SQL statement.
qid (scalar) – query number.
num_rows (scalar) – the number of rows affected by the result’s SQL statement, or a -1 if it cannot be determined or the query is not active.
// Create and prepare query qid = dbCreateQuery(db_id, "INSERT INTO PEOPLE (fname, lname) VALUES ('John', 'Doe');"); // Print report of number of rows affected print dbQueryGetNumRowsAffected(qid) " row(s) were affected";
1 row(s) were affected
Note that for
SELECT statements, the value is undefined; use