CUBRID 函数
PHP Manual

cubrid_affected_rows

(PECL CUBRID >= 8.3.0)

cubrid_affected_rowsGet number of affected rows in previous Cubrid operation

说明

int cubrid_affected_rows ([ resource $req_identifier ] )

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

参数

req_identifier

Request identifier. If the request identifier is not specified, the last request is assumed.

返回值

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

-1, when SQL sentence is not INSERT, DELETE or UPDATE.

FALSE, when the request identifier is not specified, and there is no last request.

范例

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

参见


CUBRID 函数
PHP Manual