Commit 8eeb6f9b authored by Reto Da Forno's avatar Reto Da Forno

typo fixed

parent 05d9531b
......@@ -177,7 +177,7 @@ function collect_stats($filename)
$dppusers_per_year[$year] = 0;
$dpp2users_per_year[$year] = 0;
$openmoteusers_per_year[$year] = 0;
$sql = 'select year(time_start_act), pname, count(distinct owner_fk) as c, time_start_act, b.test_status_preserved from (select distinct test_fk, tbl_serv_platforms.name as pname from tbl_serv_map_test_observer_targetimages left join tbl_serv_targetimages on (targetimage_fk = serv_targetimages_key) left join tbl_serv_platforms on (platforms_fk = serv_platforms_key)) as a left join tbl_serv_tests as b on (a.test_fk = b.serv_tests_key) where year(time_start_act) = '.$year.' and time_start_act is not null and pname is not null group by pname order by time_start_act, pname';
$sql = 'select pname, count(distinct owner_fk) as c from (select distinct test_fk, tbl_serv_platforms.name as pname from tbl_serv_map_test_observer_targetimages left join tbl_serv_targetimages on (targetimage_fk = serv_targetimages_key) left join tbl_serv_platforms on (platforms_fk = serv_platforms_key)) as a left join tbl_serv_tests as b on (a.test_fk = b.serv_tests_key) where year(time_start_act) = '.$year.' and time_start_act is not null and pname is not null group by pname';
$rs2 = mysqli_query($db, $sql) or flocklab_die('Cannot get statistics from database because: ' . mysqli_error($db));
while ($row = mysqli_fetch_array($rs2)) {
if ($row['pname'] == 'Tmote') {
......@@ -187,7 +187,7 @@ function collect_stats($filename)
} else if ($row['pname'] == 'Opal') {
$opalusers_per_year[$year] = round($row['c'] / $num_users * 100);
} else if ($row['pname'] == 'TinyNode') {
$tinyusers_per_year[$year] = round($row['c'] / $num_users * 100);
$tinynodeusers_per_year[$year] = round($row['c'] / $num_users * 100);
} else if ($row['pname'] == 'DPP') {
$dppusers_per_year[$year] = round($row['c'] / $num_users * 100);
} else if ($row['pname'] == 'OpenMote') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment