@@ 215-226 (lines=12) @@ | ||
212 | * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the |
|
213 | * database that match the criteria. |
|
214 | */ |
|
215 | public static function DCOUNT($database, $field, $criteria) |
|
216 | { |
|
217 | $field = self::fieldExtract($database, $field); |
|
218 | if (is_null($field)) { |
|
219 | return null; |
|
220 | } |
|
221 | ||
222 | // Return |
|
223 | return Statistical::COUNT( |
|
224 | self::getFilteredColumn($database, $field, $criteria) |
|
225 | ); |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * DCOUNTA |
|
@@ 345-356 (lines=12) @@ | ||
342 | * column. |
|
343 | * @return float |
|
344 | */ |
|
345 | public static function DMAX($database, $field, $criteria) |
|
346 | { |
|
347 | $field = self::fieldExtract($database, $field); |
|
348 | if (is_null($field)) { |
|
349 | return null; |
|
350 | } |
|
351 | ||
352 | // Return |
|
353 | return Statistical::MAX( |
|
354 | self::getFilteredColumn($database, $field, $criteria) |
|
355 | ); |
|
356 | } |
|
357 | ||
358 | /** |
|
359 | * DMIN |
|
@@ 384-395 (lines=12) @@ | ||
381 | * column. |
|
382 | * @return float |
|
383 | */ |
|
384 | public static function DMIN($database, $field, $criteria) |
|
385 | { |
|
386 | $field = self::fieldExtract($database, $field); |
|
387 | if (is_null($field)) { |
|
388 | return null; |
|
389 | } |
|
390 | ||
391 | // Return |
|
392 | return Statistical::MIN( |
|
393 | self::getFilteredColumn($database, $field, $criteria) |
|
394 | ); |
|
395 | } |
|
396 | ||
397 | /** |
|
398 | * DPRODUCT |
|
@@ 422-433 (lines=12) @@ | ||
419 | * column. |
|
420 | * @return float |
|
421 | */ |
|
422 | public static function DPRODUCT($database, $field, $criteria) |
|
423 | { |
|
424 | $field = self::fieldExtract($database, $field); |
|
425 | if (is_null($field)) { |
|
426 | return null; |
|
427 | } |
|
428 | ||
429 | // Return |
|
430 | return MathTrig::PRODUCT( |
|
431 | self::getFilteredColumn($database, $field, $criteria) |
|
432 | ); |
|
433 | } |
|
434 | ||
435 | /** |
|
436 | * DSTDEV |
|
@@ 538-549 (lines=12) @@ | ||
535 | * column. |
|
536 | * @return float |
|
537 | */ |
|
538 | public static function DSUM($database, $field, $criteria) |
|
539 | { |
|
540 | $field = self::fieldExtract($database, $field); |
|
541 | if (is_null($field)) { |
|
542 | return null; |
|
543 | } |
|
544 | ||
545 | // Return |
|
546 | return MathTrig::SUM( |
|
547 | self::getFilteredColumn($database, $field, $criteria) |
|
548 | ); |
|
549 | } |
|
550 | ||
551 | /** |
|
552 | * DVAR |
|
@@ 616-627 (lines=12) @@ | ||
613 | * column. |
|
614 | * @return float |
|
615 | */ |
|
616 | public static function DVARP($database, $field, $criteria) |
|
617 | { |
|
618 | $field = self::fieldExtract($database, $field); |
|
619 | if (is_null($field)) { |
|
620 | return null; |
|
621 | } |
|
622 | ||
623 | // Return |
|
624 | return Statistical::VARP( |
|
625 | self::getFilteredColumn($database, $field, $criteria) |
|
626 | ); |
|
627 | } |
|
628 | } |
|
629 |