Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

(no description)

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

Defines 1 class

Database:: (12 methods):
  DAVERAGE()
  DCOUNT()
  DCOUNTA()
  DGET()
  DMAX()
  DMIN()
  DPRODUCT()
  DSTDEV()
  DSTDEVP()
  DSUM()
  DVAR()
  DVARP()


Class: Database  - X-Ref


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)

return: null|float|string
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.

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)

return: int
param: mixed[] $database The range of cells that makes up the list or database.
param: null|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.

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)

return: int
param: mixed[] $database The range of cells that makes up the list or database.
param: null|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.

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)

return: mixed
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.

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)

return: float
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.

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)

return: float
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.

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)

return: float|string
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.

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)

return: float|string
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.

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)

return: float|string
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.

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)

return: float|string
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.

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)

return: float|string (string if result is an error)
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.

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)

return: float|string (string if result is an error)
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.