| Versionen | |
|---|---|
| drupal6 – drupal7 | db_affected_rows() |
Determine the number of rows changed by the preceding query.
This may not work, actually, without some tricky temp code.
@todo Remove this function when all queries have been ported to db_update().
includes/
<?php
function db_affected_rows() {
$statement = Database::getConnection()->lastStatement;
if (!$statement) {
return 0;
}
return $statement->rowCount();
}
?>
Kommentare
Kommentar hinzufügen