Cubrid Functions
PHP Manual

cubrid_affected_rows

(PHP 4, PHP 5)

cubrid_affected_rowsGet number of affected rows in previous Cubrid operation

Description

int cubrid_affected_rows ( int $req_handle )

The cubrid_affected_rows() function is used to get the number of rows affected by the SQL sentence (INSERT, DELETE, UPDATE).

Parameters

req_handle

Request handle.

Return Values

Number of rows affected by the SQL sentence, when process is successful.

-1, when process is unsuccessful.

Examples

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);
}
?>

See Also


Cubrid Functions
PHP Manual