Changeset 503 for trunk/banners.php
- Timestamp:
- Feb 3, 2013, 1:15:07 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/banners.php
r485 r503 24 24 25 25 26 $Query = 'SELECT * FROM (SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits`, GREATEST(`DateLast`, COALESCE((SELECT MAX(`DateLast`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `MaxDateLast` FROM `Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent`=0)) AS `T3` WHERE (`T3`.`MaxDateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))'; 26 $Query = 'SELECT * FROM (SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM '. 27 '`Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits`, '. 28 'GREATEST(`DateLast`, COALESCE((SELECT MAX(`DateLast`) FROM '. 29 '`Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `MaxDateLast` FROM '. 30 '`Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent` IS NULL)) AS `T3` '. 31 'WHERE (`T3`.`MaxDateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))'; 27 32 28 33
Note:
See TracChangeset
for help on using the changeset viewer.