rowCount() public méthode

Returns the number of rows affected by the last execution of this statement.
public rowCount ( ) : integer
Résultat integer The number of affected rows.
Exemple #1
0
 protected function execute()
 {
     if ($this->currentStatement === null) {
         $this->currentStatement = $this->db->query($this->buildQuery());
         $this->rowCount = $this->currentStatement->rowCount();
     }
     return $this->currentStatement;
 }
 /**
  * {@inheritdoc}
  */
 public function count()
 {
     if (null === $this->rowCount) {
         if ($this->rowCountCalculated) {
             $this->doCalcRowCount();
         } else {
             if (null === $this->stmt) {
                 $this->rewind();
             }
             $this->rowCount = $this->stmt->rowCount();
         }
     }
     return $this->rowCount;
 }
 /**
  * @return mixed
  */
 public function rowCount()
 {
     return $this->stmt->rowCount();
 }