Changeset 20242
- Timestamp:
- 2011/02/20 07:04:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/total/LC_Page_Admin_Total.php
r20241 r20242 592 592 list($where, $arrval) = $this->lfGetWhereMember('create_date', $sdate, $edate, $type); 593 593 594 // todo postgres 595 $col = ' 596 trunc((YEAR(create_date) - YEAR(order_birth)) - (RIGHT(create_date, 5) < RIGHT(order_birth, 5)), -1) as age, 594 if (DB_TYPE == 'pgsql') { 595 $col = ' 596 EXTRACT(YEAR FROM AGE(create_date, order_birth)) AS age, 597 '; 598 } else { 599 $col = ' 600 trunc((YEAR(create_date) - YEAR(order_birth)) - (RIGHT(create_date, 5) < RIGHT(order_birth, 5)), -1) as age, 601 '; 602 } 603 604 $col .= ' 597 605 COUNT(order_id) AS order_count, 598 606 SUM(total) AS total,
Note: See TracChangeset
for help on using the changeset viewer.