@@ 154-165 (lines=12) @@ | ||
151 | * |
|
152 | * @return float |
|
153 | */ |
|
154 | public static function DAVERAGE($database, $field, $criteria) |
|
155 | { |
|
156 | $field = self::fieldExtract($database, $field); |
|
157 | if ($field === null) { |
|
158 | return null; |
|
159 | } |
|
160 | ||
161 | // Return |
|
162 | return Statistical::AVERAGE( |
|
163 | self::getFilteredColumn($database, $field, $criteria) |
|
164 | ); |
|
165 | } |
|
166 | ||
167 | /** |
|
168 | * DCOUNT. |
|
@@ 201-212 (lines=12) @@ | ||
198 | * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the |
|
199 | * database that match the criteria. |
|
200 | */ |
|
201 | public static function DCOUNT($database, $field, $criteria) |
|
202 | { |
|
203 | $field = self::fieldExtract($database, $field); |
|
204 | if ($field === null) { |
|
205 | return null; |
|
206 | } |
|
207 | ||
208 | // Return |
|
209 | return Statistical::COUNT( |
|
210 | self::getFilteredColumn($database, $field, $criteria) |
|
211 | ); |
|
212 | } |
|
213 | ||
214 | /** |
|
215 | * DCOUNTA. |
|
@@ 337-348 (lines=12) @@ | ||
334 | * |
|
335 | * @return float |
|
336 | */ |
|
337 | public static function DMAX($database, $field, $criteria) |
|
338 | { |
|
339 | $field = self::fieldExtract($database, $field); |
|
340 | if ($field === null) { |
|
341 | return null; |
|
342 | } |
|
343 | ||
344 | // Return |
|
345 | return Statistical::MAX( |
|
346 | self::getFilteredColumn($database, $field, $criteria) |
|
347 | ); |
|
348 | } |
|
349 | ||
350 | /** |
|
351 | * DMIN. |
|
@@ 378-389 (lines=12) @@ | ||
375 | * |
|
376 | * @return float |
|
377 | */ |
|
378 | public static function DMIN($database, $field, $criteria) |
|
379 | { |
|
380 | $field = self::fieldExtract($database, $field); |
|
381 | if ($field === null) { |
|
382 | return null; |
|
383 | } |
|
384 | ||
385 | // Return |
|
386 | return Statistical::MIN( |
|
387 | self::getFilteredColumn($database, $field, $criteria) |
|
388 | ); |
|
389 | } |
|
390 | ||
391 | /** |
|
392 | * DPRODUCT. |
|
@@ 418-429 (lines=12) @@ | ||
415 | * |
|
416 | * @return float |
|
417 | */ |
|
418 | public static function DPRODUCT($database, $field, $criteria) |
|
419 | { |
|
420 | $field = self::fieldExtract($database, $field); |
|
421 | if ($field === null) { |
|
422 | return null; |
|
423 | } |
|
424 | ||
425 | // Return |
|
426 | return MathTrig::PRODUCT( |
|
427 | self::getFilteredColumn($database, $field, $criteria) |
|
428 | ); |
|
429 | } |
|
430 | ||
431 | /** |
|
432 | * DSTDEV. |
|
@@ 459-470 (lines=12) @@ | ||
456 | * |
|
457 | * @return float |
|
458 | */ |
|
459 | public static function DSTDEV($database, $field, $criteria) |
|
460 | { |
|
461 | $field = self::fieldExtract($database, $field); |
|
462 | if ($field === null) { |
|
463 | return null; |
|
464 | } |
|
465 | ||
466 | // Return |
|
467 | return Statistical::STDEV( |
|
468 | self::getFilteredColumn($database, $field, $criteria) |
|
469 | ); |
|
470 | } |
|
471 | ||
472 | /** |
|
473 | * DSTDEVP. |
|
@@ 500-511 (lines=12) @@ | ||
497 | * |
|
498 | * @return float |
|
499 | */ |
|
500 | public static function DSTDEVP($database, $field, $criteria) |
|
501 | { |
|
502 | $field = self::fieldExtract($database, $field); |
|
503 | if ($field === null) { |
|
504 | return null; |
|
505 | } |
|
506 | ||
507 | // Return |
|
508 | return Statistical::STDEVP( |
|
509 | self::getFilteredColumn($database, $field, $criteria) |
|
510 | ); |
|
511 | } |
|
512 | ||
513 | /** |
|
514 | * DSUM. |
|
@@ 540-551 (lines=12) @@ | ||
537 | * |
|
538 | * @return float |
|
539 | */ |
|
540 | public static function DSUM($database, $field, $criteria) |
|
541 | { |
|
542 | $field = self::fieldExtract($database, $field); |
|
543 | if ($field === null) { |
|
544 | return null; |
|
545 | } |
|
546 | ||
547 | // Return |
|
548 | return MathTrig::SUM( |
|
549 | self::getFilteredColumn($database, $field, $criteria) |
|
550 | ); |
|
551 | } |
|
552 | ||
553 | /** |
|
554 | * DVAR. |
|
@@ 581-592 (lines=12) @@ | ||
578 | * |
|
579 | * @return float |
|
580 | */ |
|
581 | public static function DVAR($database, $field, $criteria) |
|
582 | { |
|
583 | $field = self::fieldExtract($database, $field); |
|
584 | if ($field === null) { |
|
585 | return null; |
|
586 | } |
|
587 | ||
588 | // Return |
|
589 | return Statistical::VARFunc( |
|
590 | self::getFilteredColumn($database, $field, $criteria) |
|
591 | ); |
|
592 | } |
|
593 | ||
594 | /** |
|
595 | * DVARP. |
|
@@ 622-633 (lines=12) @@ | ||
619 | * |
|
620 | * @return float |
|
621 | */ |
|
622 | public static function DVARP($database, $field, $criteria) |
|
623 | { |
|
624 | $field = self::fieldExtract($database, $field); |
|
625 | if ($field === null) { |
|
626 | return null; |
|
627 | } |
|
628 | ||
629 | // Return |
|
630 | return Statistical::VARP( |
|
631 | self::getFilteredColumn($database, $field, $criteria) |
|
632 | ); |
|
633 | } |
|
634 | } |
|
635 |