PMA\libraries\dbi\DBIExtension::affectedRows PHP Method

affectedRows() public method

returns the number of rows affected by last query
public affectedRows ( resource $link ) : integer
$link resource the connection object
return integer
    public function affectedRows($link);

Usage Example

 /**
  * returns the number of rows affected by last query
  *
  * @param object $link           the connection object
  * @param bool   $get_from_cache whether to retrieve from cache
  *
  * @return int|boolean
  */
 public function affectedRows($link = null, $get_from_cache = true)
 {
     $link = $this->getLink($link);
     if ($link === false) {
         return false;
     }
     if ($get_from_cache) {
         return $GLOBALS['cached_affected_rows'];
     } else {
         return $this->_extension->affectedRows($link);
     }
 }