Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

(no description)

File Size: 632 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Database:: (15 methods):
  fieldExtract()
  filter()
  getFilteredColumn()
  DAVERAGE()
  DCOUNT()
  DCOUNTA()
  DGET()
  DMAX()
  DMIN()
  DPRODUCT()
  DSTDEV()
  DSTDEVP()
  DSUM()
  DVAR()
  DVARP()


Class: Database  - X-Ref

fieldExtract($database, $field)   X-Ref
fieldExtract.

Extracts the column ID to use for the data field.

param: mixed[] $database The range of cells that makes up the list or database.
param: mixed $field Indicates which column is used in the function. Enter the
return: null|string

filter($database, $criteria)   X-Ref
filter.

Parses the selection criteria, extracts the database rows that match those criteria, and
returns that subset of rows.

param: mixed[] $database The range of cells that makes up the list or database.
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: array of mixed

getFilteredColumn($database, $field, $criteria)   X-Ref
No description

DAVERAGE($database, $field, $criteria)   X-Ref
DAVERAGE.

Averages the values in a column of a list or database that match conditions you specify.

Excel Function:
DAVERAGE(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float|string

DCOUNT($database, $field, $criteria)   X-Ref
DCOUNT.

Counts the cells that contain numbers in a column of a list or database that match conditions
that you specify.

Excel Function:
DCOUNT(database,[field],criteria)

Excel Function:
DAVERAGE(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: int

DCOUNTA($database, $field, $criteria)   X-Ref
DCOUNTA.

Counts the nonblank cells in a column of a list or database that match conditions that you specify.

Excel Function:
DCOUNTA(database,[field],criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: int

DGET($database, $field, $criteria)   X-Ref
DGET.

Extracts a single value from a column of a list or database that matches conditions that you
specify.

Excel Function:
DGET(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: mixed

DMAX($database, $field, $criteria)   X-Ref
DMAX.

Returns the largest number in a column of a list or database that matches conditions you that
specify.

Excel Function:
DMAX(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float

DMIN($database, $field, $criteria)   X-Ref
DMIN.

Returns the smallest number in a column of a list or database that matches conditions you that
specify.

Excel Function:
DMIN(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float

DPRODUCT($database, $field, $criteria)   X-Ref
DPRODUCT.

Multiplies the values in a column of a list or database that match conditions that you specify.

Excel Function:
DPRODUCT(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float

DSTDEV($database, $field, $criteria)   X-Ref
DSTDEV.

Estimates the standard deviation of a population based on a sample by using the numbers in a
column of a list or database that match conditions that you specify.

Excel Function:
DSTDEV(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float|string

DSTDEVP($database, $field, $criteria)   X-Ref
DSTDEVP.

Calculates the standard deviation of a population based on the entire population by using the
numbers in a column of a list or database that match conditions that you specify.

Excel Function:
DSTDEVP(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float|string

DSUM($database, $field, $criteria)   X-Ref
DSUM.

Adds the numbers in a column of a list or database that match conditions that you specify.

Excel Function:
DSUM(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float

DVAR($database, $field, $criteria)   X-Ref
DVAR.

Estimates the variance of a population based on a sample by using the numbers in a column
of a list or database that match conditions that you specify.

Excel Function:
DVAR(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float

DVARP($database, $field, $criteria)   X-Ref
DVARP.

Calculates the variance of a population based on the entire population by using the numbers
in a column of a list or database that match conditions that you specify.

Excel Function:
DVARP(database,field,criteria)

param: mixed[] $database The range of cells that makes up the list or database.
param: int|string $field Indicates which column is used in the function. Enter the
param: mixed[] $criteria The range of cells that contains the conditions you specify.
return: float