update : 2015.11.03
php.shukuma.com검색:
|
maxdb_stmt_affected_rowsmaxdb_stmt::affected_rows(PECL maxdb >= 1.0) maxdb_stmt_affected_rows -- maxdb_stmt::affected_rows — Returns the total number of rows changed, deleted, or inserted by the last executed statement 설명절차식 형식
int maxdb_stmt_affected_rows
( resource
$stmt
)객체 기반 형식 int $maxdb_stmt->affected_rows;
maxdb_stmt_affected_rows() returns the number of rows affected by INSERT, UPDATE, or DELETE query. If the last query was invalid or the number of rows can not determined, this function will return -1. 반환값An integer greater than zero indicates the number of rows affected or retrieved. Zero indicates that no records where updated for an UPDATE/DELETE statement, no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query has returned an error or the number of rows can not determined. 예제Example #1 객체 기반 형식
<?php Example #2 절차식 형식
<?php 위 예제의 출력 예시: rows inserted: 4 참고
|