选择语言 :

 Driver_Database_Driver_Mongo_Result::total_count

统计当前查询返回数据

int Driver_Database_Driver_Mongo_Result::total_count( )
返回值
  • int
File: ./drivers/database/mongo/result.class.php
protected function total_count()
{
    if ($this->_result instanceof ArrayIterator)
    {
        $count = $this->_result->count();
    }
    else
    {
        $count = $this->_result->count(true);
    }

    if (!$count>0)$count = 0;

    return $count;
}