public function count($column = '*', $criteria = array(),
            $return = Table::RETURN_DEFAULT) {
        $this->query = 'SELECT COUNT(' . Util::camelTo_($column) . ') as rows FROM `' . $this->name . '`';
        $this->where($criteria);

        $this->setExpectedResult($return, true);
        if ($ret = $this->execute()) {
            return ($ret) ? $ret[0]['rows'] : 0;
        }
        return 0;
    }
public function count($column = '*', $criteria = array(),
            $return = Table::RETURN_DEFAULT) {
        $this->query = 'SELECT COUNT(' . Util::camelTo_($column) . ') as rows FROM `' . $this->name . '`';
        $this->where($criteria);

        $this->setExpectedResult($return, true);
        if ($ret = $this->execute()) {
            return ($ret) ? $ret[0]['rows'] : 0;
        }
        return 0;
    }
public function count ( $ column = '*' , $ criteria = array ( ) , $ return = Table :: RETURN_DEFAULT ) { $ this -> query = 'SELECT COUNT(' . Util :: camelTo_ ( $ column ) . ') as rows FROM `' . $ this -> name . '`' ; $ this -> where ( $ criteria ) ; $ this -> setExpectedResult ( $ return , true ) ; if ( $ ret = $ this -> execute ( ) ) { return ( $ ret ) ? $ ret [ 0 ] [ 'rows' ] : 0 ; } return 0 ; }
Counts the number of rows in the table based on a column
@param string $column The column to count
@return Int
Counts the number of rows in the table based on a column