Server IP : 101.255.104.117 / Your IP : 101.255.104.117 Web Server : Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38 System : Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586 User : user ( 0) PHP Version : 5.6.38 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/xampp182/htdocs/repository/application/views/ |
Upload File : |
<h4>Browse by Author</h4> <hr> <table id="example" class="table table-striped table-bordered" style="width:100%"> <thead> <tr> <th width="80px">No</th> <th>Author</th> </tr> </thead> <tbody> <?php $start = 0; foreach ($data->result() as $repository) { $query = $this->db->query("SELECT * FROM repo where id_author = '$repository->id' "); $num = $query->num_rows(); if ($num == 0){ $nums = "display:none"; }else{ $nums = ""; } ?> <tr> <td><?php echo ++$start ?></td> <td><a href="<?= base_url() ?>home/single_author/<?= $repository->id ?>"><?php echo $repository->author ?></a> <span class="badge" style="background:#017BFF; color:white; <?= $nums ?>"><?= $num ?></span> </td> </tr> <?php } ?> </tbody> </table>