Auswertung Handy

This commit is contained in:
aschwarz
2023-03-20 19:32:57 +01:00
parent 4bb21bf23c
commit 5d8b00feba
4 changed files with 304 additions and 54 deletions

View File

@ -97,7 +97,12 @@ if ($action == '') {
FROM jumi_umfragen_ergebnisse
WHERE uaid = $row2[uaid]");
$row_cur_antw = $result_cur_antw->fetch_array();
if($row_anz_antworten['Anz'] != '0'){
$prozent = 100/$row_anz_antworten['Anz']*$row_cur_antw['Anz'];
}else{
$prozent = 0;
}
$inner1[$ln2]['prozent'] = $prozent;
$inner1[$ln2]['uaid'] = $row2['uaid'];
@ -105,16 +110,35 @@ if ($action == '') {
$value2 = $inner1;
$ln2++;
}
if($row_anz_userfrage['Anz'] != 0){
$anz_userfrage = $row_anz_userfrage['Anz'];
}else{
$anz_userfrage = 0;
}
$row['inner'] = $value2;
$row['anz_userfrage'] = $row_anz_userfrage['Anz'];
$row['anz_userfrage'] = $anz_userfrage;
$row['anz_antworten_frage'] = $row_anz_antworten['Anz'];
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
echo"<pre>";
print_r($table_data);
echo"</pre>";
# echo"<pre>";
# print_r($table_data);
# echo"</pre>";
$query3 = "SELECT freitext
FROM jumi_umfragen_erg_freitext
WHERE umid = $row_umid[umid]
ORDER BY uefid desc";
$result3 = $db->query($query3);
// Ergebnisse lesen und an den Client ausgeben
while ($row3 = $result3->fetch_array()) {
$table_data3[] = $row3;
}
$smarty->assign('table_data3', $table_data3);
}