Skip to content

Commit

Permalink
adding a method to count the numer of rows in an update
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Aug 14, 2012
1 parent f803556 commit 166a228
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Model/AppModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,15 @@ private function __clearCache() {
return ClearCache::engines(Inflector::underscore($this->plugin));
}

/**
* @brief get the number of rows that was affected by the last query
*
* @return integer
*/
public function getAffectedRows() {
return ConnectionManager::getDataSource($this->useDbConfig)->lastAffected();
}

/**
* @brief get a unique list of any model field, used in the search
*
Expand Down

0 comments on commit 166a228

Please sign in to comment.