View Issue Details

IDProjectCategoryView StatusLast Update
0015501phpList 3 applicationStatisticspublic29-04-11 17:58
Reporterh2b2 Assigned To 
Status resolvedResolutionfixed 
Product Version2.10.12 
Target Version2.10.XFixed in Version2.10.14 
Summary0015501: Click rate of message click statistics always displays 0.00%
Descriptionsteph@ne reported the following issue:
===== Start Quote =====
in ?page=mclicks , I have always a rate set to 0.00%
looking in the code, the line 49 is as follows:

$perc = sprintf('%0.2f',($row['numclicks'] / $row['total'] * 100));

but the select is

$req = Sql_Query(sprintf('select distinct messageid, subject, sum(clicked) as totalclicks, count(distinct userid) as users, count(distinct linkid) as linkcount from %s as linktrack, %s as message
where clicked and linktrack.messageid = %s group by messageid order by entered desc limit 50',

and it seems that numclicks and total columns are not set
======= End Quote =======
Additional InformationConfirmed in the online demo.
Additional reports in the forum:
TagsNo tags attached.



22-08-10 22:11

manager   ~0051073

Last edited: 22-08-10 22:29

View 2 revisions

This following code is suggested by unbellver (haven't tested it):
==== Start Quote ====
You can use this one to get average clicks by user (c/u)

$perc = sprintf('%0.2f',($row['totalclicks'] / $row['users'] ));

$ls->addColumn($row['messageid'].' '.substr($row['subject'],0,50),$GLOBALS['I18N']->get('rate'),$perc.' c/u');
==== End Quote ====