@@ 221-232 (lines=12) @@ | ||
218 | * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the |
|
219 | * database that match the criteria. |
|
220 | */ |
|
221 | public static function DCOUNT($database, $field, $criteria) |
|
222 | { |
|
223 | $field = self::fieldExtract($database, $field); |
|
224 | if (is_null($field)) { |
|
225 | return null; |
|
226 | } |
|
227 | ||
228 | // Return |
|
229 | return Statistical::COUNT( |
|
230 | self::getFilteredColumn($database, $field, $criteria) |
|
231 | ); |
|
232 | } |
|
233 | ||
234 | /** |
|
235 | * DCOUNTA. |
|
@@ 357-368 (lines=12) @@ | ||
354 | * |
|
355 | * @return float |
|
356 | */ |
|
357 | public static function DMAX($database, $field, $criteria) |
|
358 | { |
|
359 | $field = self::fieldExtract($database, $field); |
|
360 | if (is_null($field)) { |
|
361 | return null; |
|
362 | } |
|
363 | ||
364 | // Return |
|
365 | return Statistical::MAX( |
|
366 | self::getFilteredColumn($database, $field, $criteria) |
|
367 | ); |
|
368 | } |
|
369 | ||
370 | /** |
|
371 | * DMIN. |
|
@@ 398-409 (lines=12) @@ | ||
395 | * |
|
396 | * @return float |
|
397 | */ |
|
398 | public static function DMIN($database, $field, $criteria) |
|
399 | { |
|
400 | $field = self::fieldExtract($database, $field); |
|
401 | if (is_null($field)) { |
|
402 | return null; |
|
403 | } |
|
404 | ||
405 | // Return |
|
406 | return Statistical::MIN( |
|
407 | self::getFilteredColumn($database, $field, $criteria) |
|
408 | ); |
|
409 | } |
|
410 | ||
411 | /** |
|
412 | * DPRODUCT. |
|
@@ 438-449 (lines=12) @@ | ||
435 | * |
|
436 | * @return float |
|
437 | */ |
|
438 | public static function DPRODUCT($database, $field, $criteria) |
|
439 | { |
|
440 | $field = self::fieldExtract($database, $field); |
|
441 | if (is_null($field)) { |
|
442 | return null; |
|
443 | } |
|
444 | ||
445 | // Return |
|
446 | return MathTrig::PRODUCT( |
|
447 | self::getFilteredColumn($database, $field, $criteria) |
|
448 | ); |
|
449 | } |
|
450 | ||
451 | /** |
|
452 | * DSTDEV. |
|
@@ 560-571 (lines=12) @@ | ||
557 | * |
|
558 | * @return float |
|
559 | */ |
|
560 | public static function DSUM($database, $field, $criteria) |
|
561 | { |
|
562 | $field = self::fieldExtract($database, $field); |
|
563 | if (is_null($field)) { |
|
564 | return null; |
|
565 | } |
|
566 | ||
567 | // Return |
|
568 | return MathTrig::SUM( |
|
569 | self::getFilteredColumn($database, $field, $criteria) |
|
570 | ); |
|
571 | } |
|
572 | ||
573 | /** |
|
574 | * DVAR. |
|
@@ 642-653 (lines=12) @@ | ||
639 | * |
|
640 | * @return float |
|
641 | */ |
|
642 | public static function DVARP($database, $field, $criteria) |
|
643 | { |
|
644 | $field = self::fieldExtract($database, $field); |
|
645 | if (is_null($field)) { |
|
646 | return null; |
|
647 | } |
|
648 | ||
649 | // Return |
|
650 | return Statistical::VARP( |
|
651 | self::getFilteredColumn($database, $field, $criteria) |
|
652 | ); |
|
653 | } |
|
654 | } |
|
655 |