(PECL CUBRID >= 8.3.0)
cubrid_affected_rows — Get number of affected rows in previous Cubrid operation
The cubrid_affected_rows() function is used to get the number of rows affected by the SQL sentence (INSERT, DELETE, UPDATE).
Request identifier.
Number of rows affected by the SQL sentence, when process is successful.
-1, when SQL sentence is not INSERT, DELETE or UPDATE.
Example #1 cubrid_affected_rows() example
<?php
$req = cubrid_execute ($con, "delete from person where name like ’j%’ ");
if ($req) {
$row_count = cubrid_affected_rows ($req);
echo $row_count;
cubrid_close_request ($req);
}
?>