Menu

#674 There are currently no statistics available

open
nobody
None
5
2007-03-06
2007-03-06
No

If I look at the general stats (the one where you see all banners, with views and clicks), phpadsnews can show the correct number of clicks/views. If I click on a banner then I come back to the stats, the counter has been increased. But clicking on details (to see the days) I get the error.

Here is the code that fails:
in lib-history.inc.php
$result = phpAds_dbQuery("
SELECT
UNIX_TIMESTAMP(MIN(t_stamp)) AS span,
TO_DAYS(NOW()) - TO_DAYS(MIN(t_stamp)) + 1 AS span_days
FROM
".$phpAds_config['tbl_adviews']."
".(isset($lib_history_where) ? 'WHERE '.$lib_history_where : '')."
");

looking in the table adsadviews, I see that t_stamp's value is '0000-00-00 00:00:00' on some records.
If I add (AND UNIX_TIMESTAMP(t_stamp) > 0) in the query, it works.

The problem was disscusted in 2005 http://forum.openads.org/index.php?showtopic=7559, I got the same problem today. I'm surprised than this bug was not fixed since than.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.