| " . $gui['serial_num'] . " | $groupby | " . $gui['count'] . " | " . $gui['percentage'] . " | " . $gui['accumulative'] . " | "; $sum_prsent = 0; if ($iFetch > 0) { $sum = $Fetch[0]["wordsum"]; $first = $sum * 100 / $sum_word; for ($i = 0; $i < $iFetch; $i++) { $sum = $Fetch[$i]["wordsum"]; $prsent = $sum * 100 / $sum_word; $prsent1 = $prsent * 100 / $first; $sum_prsent += $prsent; echo "
|---|---|---|---|---|
| " . ($i + 1) . " | " . $Fetch[$i][$groupby] . " | " . number_format($sum) . " | " . number_format($prsent, 3) . " | " . number_format($sum_prsent, 1) . " | "; echo "
In $in_book_count Books
"; $query = "SELECT bookid,co,su from (SELECT bookid,sum(count) as su,count(*) co FROM "._TABLE_WORD_STATISTICS_." WHERE (word $wordop $newSpell) group by bookid) as T order by co DESC limit 20"; /*查總數,并分類匯總*/ $Fetch = PDO_FetchAll($query); $iFetch = count($Fetch); echo "| 序号 | Book | 单词个数 | 单词数量 | "; if ($iFetch > 0) { for ($i = 0; $i < $iFetch; $i++) { echo "
|---|---|---|---|
| " . ($i + 1) . " | " . $toc_book[$Fetch[$i]["bookid"]] . " | " . number_format($Fetch[$i]["co"]) . " | " . number_format($Fetch[$i]["su"]) . " | "; echo "
$word_count Words
"; $query = "SELECT word,co from (SELECT word,sum(count) co FROM "._TABLE_WORD_STATISTICS_." WHERE (word $wordop $newSpell) group by word) as T order by co DESC limit 100"; /*查總數,并分類匯總*/ $Fetch = PDO_FetchAll($query); $iFetch = count($Fetch); echo "| 序号 | Word | 数量 | "; if ($iFetch > 0) { for ($i = 0; $i < $iFetch; $i++) { echo "
|---|---|---|
| " . ($i + 1) . " | " . $Fetch[$i]["word"] . " | " . number_format($Fetch[$i]["co"]) . " | "; echo "