Changeset 484 for trunk/banners.php
- Timestamp:
- Jun 18, 2010, 7:17:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/banners.php
r483 r484 24 24 25 25 26 $Query = 'SELECT *, (`Hits` + (SELECT SUM(`Hits`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`)) AS `TotalHits` FROM `Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent`=0) AND (`DateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))';26 $Query = 'SELECT *, (`Hits` + COALESCE((SELECT SUM(`Hits`) FROM `Referrer` AS `T1` WHERE `T1`.`Parent` = `T2`.`Id`), 0)) AS `TotalHits` FROM `Referrer` AS `T2` WHERE (`Show`=1) AND (`Parent`=0) AND (`DateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))'; 27 27 28 28 … … 47 47 while($Line = $DbResult->fetch_assoc()) 48 48 { 49 echo('<tr><td> '.$Line['Web'].'</td>'.49 echo('<tr><td><a href="'.$Line['LastURL'].'">'.$Line['Web'].'</a></td>'. 50 50 '<td>'.HumanDate($Line['DateLast']).'</td>'. 51 51 '<td>'.$Line['TotalHits'].'</td></tr>');
Note:
See TracChangeset
for help on using the changeset viewer.