PHP » GoLang |
login |
register |
about
|
GoLang mysqli::$affected_rows
request it (501)
GoLang replacement for PHP's mysqli::$affected_rows
[edit | history]
mysqli::$affected_rowsmysqli_affected_rows(PHP 5, PHP 7) mysqli::$affected_rows -- mysqli_affected_rows — Gets the number of affected rows in a previous MySQL operation DescriptionObject oriented style Procedural style Returns the number of rows affected by the last INSERT, UPDATE, REPLACE or DELETE query. For SELECT statements mysqli_affected_rows() works like mysqli_num_rows(). Parameters
Return ValuesAn integer greater than zero indicates the number of rows affected or retrieved. Zero indicates that no records were updated for an UPDATE statement, no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query returned an error.
ExamplesExample #1 $mysqli->affected_rows example Object oriented style
<?php Procedural style
<?php The above examples will output: Affected rows (INSERT): 984 Affected rows (UPDATE): 168 Affected rows (DELETE): 815 Affected rows (SELECT): 169 See Also
|
more
Recently updated
more
Most requested
more
Last requests
|