CodeIgniter-Como chegar suspensa valor múltipla

votos
0

Eu tenho problem..Nagatomo eo Hulk têm o mesmo pos kode, aqui eu quero mostrar Nagatomo eo Hulk acordo com a pos kode = 10710. Mas só Nagatomo aparece no menu suspenso.

Meu screenshoot: 1 & 2

Meu Controlador:

    $data['header'] = header/header;
    $data['navbar'] = navbar/navbar;
    $data['sidebar'] = sidebar/sidebar;
    $data['body'] = body/delivery;

    $id_user = trim($this->session->userdata('id_user'));

    $data_delivery = $this->model_app->data_delivery();
    $data['data_delivery'] = $data_delivery;

    $this->load->view('template', $data);

Meu modelo :

    $query = $this->db->query(SELECT A.*, B.driver_id, C.nama
                                FROM collecting A 
                                INNER JOIN driver_detail B ON A.receiver_pos LIKE concat(concat('%',B.kode_pos),'%')
                                INNER JOIN driver C ON C.driver_id = B.driver_id
                                GROUP BY collecting_id
                                );
    return $query->result();

Minha visão :

                            <table data-toggle=table data-show-refresh=false data-show-toggle=true data-show-columns=true data-search=true  data-pagination=true data-sort-name=name data-sort-order=desc>
                            <thead>
                            <tr>
                                <th data-field=penerima data-sortable=true>Penerima</th>
                                <th data-field=nama data-sortable=true>Supir</th>
                                <th>Aksi</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $no = 0; foreach($data_delivery as $row) : $no++;?>
                            <tr>
                                <td data-field=penerima><?php echo $row->receiver_nm;?><hr><?php echo $row->receiver_addr;?>, <?php echo $row->receiver_kota;?>, <?php echo $row->receiver_pos;?><br><?php echo $row->receiver_telp;?></td>
                                <td data-field=nama>
                                    <select class=js-example-basic-single form-control name=nama>
                                    <option value=<?php echo $row->nama; ?>><?php echo $row->nama; ?></option></select>
                                </td>
                                <td> 
                                <a class=ubah btn btn-primary btn-xs href=<?php echo base_url();?>delivery/edit/<?php echo $row->collecting_id;?>><span class=glyphicon glyphicon-edit ></span></a>
                                </td>
                            </tr>
                            <?php endforeach;?>
                            </tbody>

                            </table>

Nota:

  • Nagatomo & Hulk de motorista mesa
  • Kode pos de recolha mesa

Obrigado

Publicado 08/11/2018 em 06:46
fonte usuário
Em outras línguas...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more