public function count_all() { $this->use->use_model('data_base'); $this->use->use_lib('table/tpl_election'); $tpl = new tpl_election(); $db = new data_base($tpl->table(), array($tpl->id())); return count($db->get()); }
} ?> </div> <h2 class="sub-header">Election table</h2> <div class="table-responsive"> <table id="table" data-toggle="table" data-url="<?php echo site_url('admin/find_election_table_ajax'); ?> " data-cache="false" data-height="400" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-pagination="true" data-page-list="[5, 10, 20, 50, 100, 200]" data-search="true" data-flat="true"> <thead> <tr> <th data-field="<?php echo $tpl_election->id(); ?> " data-halign="center" data-sortable="true"> ID</th> <th data-field="<?php echo $tpl_students->first_name(); ?> " data-halign="center" data-sortable="true"> First Name </th> <th data-field="<?php echo $tpl_students->last_name(); ?> " data-halign="center" data-sortable="true"> Last Name </th> <th data-field="<?php