选择语言 :

 Module_Database_Result::count

Implements [Countable::count], returns the total number of rows.

echo count($result);

integer Module_Database_Result::count( )
返回值
  • integer
File: ./modules/database/result.class.php
public function count()
{
    if ( null===$this->_total_rows )
    {
        $this->_total_rows = $this->total_count();
    }
    return $this->_total_rows;
}