Good day, I have billing system that only works when the data in the database is not much but when I import a full items of data into the table the browser freeze and takes a long time to retrieve what I search, I have tried to add limit to my query as suggested here:
MySQL & PHP load more then 1000 items makes browser freeze
but the problem with that is, it does not retrieved all data from the table as its limited.
is there any other workaround that I can try?
Here is my piece of code:
<?php
$query = "SELECT * FROM medications ";
$result = $con->query($query);
?>
<select id="disease" style="width: 40%;" name="disease" required="true" data-toggle="tooltip" data-original-title="medications" class="date-picker form-control col-md-7 col-xs-12" data-rel="chosen">
<option value="">Select Disease</option>
<?php while ($row = $result->fetch_array(MYSQLI_ASSOC)) { ?>
<option value="<?php echo $row['ICD10'] ?>"><?php echo $row['diagnosis']; ?> </option>
<?php } ?>
</select>