0
表格創建超過3分鐘後我發送請求數據庫表中有大約4000條記錄,我認爲可以通過JavaScript解決,但是我可以通過JavaScript解決我不知道如何。感謝用mysql查詢生成大型html表格非常慢 - 4000+行查詢
$query = "SELECT * FROM tblRazduzeniUgovori";
if ($result = mysqli_query($con, $query)) {
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td><input type='checkbox' name='brojUgovora[]' value='" . $row['Broj'] . "'/></td>";
echo "<td style='font-size:15px;'>" . $row['Broj'] . "</td>";
echo "<td>" . $row['Kontrolni_Broj'] . "</td>";
echo "<td><span class='label label-success' style='width:90%;'>";
foreach ($kor_id as $key => $val) {
if ($val == $row['Korisnik_ID']) {
echo $kor_ime[$key] . " " . $kor_prezime[$key];
break;
}
}
echo "</span></td>";
echo "<td>" . $row['Datum_Razduzenja'] . "</td>";
echo "<td>" . $row['Ime_Kupca'] . "</td>";
echo "<td>" . $row['Ime_Prodavca'] . "</td>";
echo "<td>" . $row['Cijena'] . " KM</td>";
echo "<td style='padding:6px;'><span class='label label- info' style='width:90%; text-align:center;'><a href='/crm/ugovori/" . $row['Slika'] . "' style='color:white;'>" . $row['Slika'] . "</a></span></td>";
echo "</tr>";
}
}
mysqli_close($con);
return $vrati;
}