SQLite3::changes

(PHP 5 >= 5.3.0, PHP 7)

SQLite3::changes Returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement

说明

public SQLite3::changes ( void ) : int

Returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement.

参数

此函数没有参数。

返回值

Returns an integer value corresponding to the number of database rows changed (or inserted or deleted) by the most recent SQL statement.

范例

Example #1 SQLite3::changes() example

<?php
$db 
= new SQLite3('mysqlitedb.db');

$query $db->exec('UPDATE counter SET views=0 WHERE page="test"');
if (
$query) {
    echo 
'Number of rows modified: '$db->changes();
}
?>

相关文章
php eventutil returns the most recent socket error numberphp cubrid mysql 兼容性函数 return the number of rows affected by the last sql statementphp ibm db2 函数 returns the number of rows affected by an sql statementphp firebird/interbase 函数 return the number of rows that were affected by the previous queryphp maxdb 函数 returns the number of columns for the most recent queryphp maxdb 函数 returns the total number of rows changed deleted or inserted by the last executed statementphp maxdb 函数 returns the error code for the most recent statement callphp oci8 函数 returns the next child statement resource from a parent statement resource that has oracle database 12c implicit result setsphp sqlite 函数 returns the number of rows that were changed by the most recent sql statementphp sqlite 函数 returns the rowid of the most recently inserted rowphp sqlite 函数 returns the number of rows in a buffered result setphp mysqli stmt returns the total number of rows changed deleted or inserted by the last executed statementphp mysqli stmt returns the error code for the most recent statement callphp mysqli returns the number of columns for the most recent queryphp mysqlnduhconnection returns the number of columns for the most recent queryphp sqlite3 returns the number of database rows that were changed or inserted or deleted by the most recent sql statementphp sqlite3 returns the numeric result code of the most recent failed sqlite requestphp sqlite3 returns english text describing the most recent failed sqlite requestphp sqlite3 returns the row id of the most recent insert into the databasephp sqlite3stmt returns the number of parameters within the prepared statement
关注编程学问公众号