I want to show some data into table with two paramaters from combobox
When I choose combobox 'kategori' and combobox 'option', I want data can be show in table, but when I try this code :
foreach ($filter as $f) {
if ( ($f['name'] == 'kategori' && $f['value'] == 'cake') && ($f['name'] == 'option' && $f['value'] == 'sweet') ) {
$totalRecord = $this->nas->countRecord($filter);
$this->load->library('pagination');
$config['base_url'] = base_url('transaksi/report_nas/show/');
$config['total_rows'] = $totalRecord;
$config['per_page'] = 10;
$config['uri_segment'] = 4;
$this->config->load('pagination');
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
$data['total'] = $config['total_rows'];
$start = (($page - 1) * $config['per_page']);
$data['no'] = $start + 1;
$data['records'] = $this->nas->recordsList($start, $config['per_page'], $filter);
$data['filter'] = $filter;
$data['shop'] = $shop;
(count($data['records']) > 0 ) ? $this->load->view('transaksi/report_nas/table', $data) : $this->load->view('noevent');
}
}
this syntax doesn't work :
if ( ($f['name'] == 'kategori' && $f['value'] == 'cake') && ($f['name'] == 'option' && $f['value'] == 'sweet') ) {
I have try this one too :
if ($f['name'] == 'kategori' && $f['value'] == 'cake') {
if ($f['name'] == 'option' && $f['value'] == 'sweet') {
both of them show no data.
Aucun commentaire:
Enregistrer un commentaire