我是新来的php。我想在codeignter中的php中显示5百万条记录。我正在使用选择明星sql查询来选择表。它运行良好,但需要很长时间才能将数据加载到数据表中。 任何帮助,将不胜感激。 在此先感谢。如何在codeigniter中显示5万个数据数据
<?php
include('layout/header.php');
include('layout/sidebar.php');
?>
<div data-widget-group="group1">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h2>Data Tables</h2>
<div class="panel-ctrls"></div>
</div>
<div class="panel-body no-padding table-responsive">
<form action="<?= base_url(); ?>signin/sendemailstudent" method="post">
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th style="padding-right:100px;">S.No</th>
<th>School</th>
<th>Date Of Admission</th>
<th>Register Serial</th>
<th>Student Name</th>
<th>Date Of Birth</th>
<th>Father Name </th>
<th>Phone </th>
<th>Email</th>
<th>Pincode</th>
<th>Class To Which Admitted</th>
<th>Class From Which Withdrawn</th>
<th>Date Of Withdrawl</th>
<th>Upload By</th>
<th>Notify<input type="checkbox" onclick="check();" id="select_all" name="select_all" /></th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
foreach ($data as $value) {
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $value['school_name']; ?></td>
<td><?php echo $value['doa']; ?></td>
<td><?php echo $value['register_serial']; ?></td>
<td><a href='<?php echo base_url('signin/editstudent').'/'.$value['id']; ?>'><?php echo $value['name']; ?></a></td>
<td><?php echo $value['dob']; ?></td>
<td><?php echo $value['father_name']; ?></td>
<td><?php echo $value['phone']; ?></td>
<td><?php echo $value['email_address']; ?></td>
</tr>
<?php
$i++;
} ?>
<div class="clearfix pt-md">
</div>
</tbody>
</table>
</form>
</div>
<div class="panel-footer"></div>
</div>
</div>
</div>
</div>
<?php include('layout/footer.php'); ?>
- >加载数据 - >将它们在高速缓存 - >读出的高速缓存 – Federkun
既可以使用服务器侧的数据表,其具有选项以显示10,20,50,100只记录在一个时间或使用高速缓存代替 –
使用https://redis.io/ – Juggernaut