コード例 #1
0
ファイル: PdoSqlsrv.php プロジェクト: ToNict/phalcon-sqlsrv
 /**
  * Gets number of rows returned by a resultset
  * <code>
  * $result = $connection->query("SELECT * FROM robots ORDER BY name");
  * echo 'There are ', $result->numRows(), ' rows in the resultset';
  * </code>.
  *
  * @return int
  */
 public function numRows()
 {
     $rowCount = $this->_rowCount;
     if ($rowCount === false) {
         $rowCount = $this->_pdoStatement->rowCount();
         if ($rowCount === false) {
             parent::numRows();
         }
         $this->_rowCount = $rowCount;
     }
     return $rowCount;
 }