Default Avatar

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Tolong pilih kategori sesuai, jenis posting (diskusi atau bukan) dan sertakan tag/topik yang sesuai seperti komputer, java, php, mysql, dll. Promosi atau posting tidak pada tempatnya akan kami hapus!
- Bagi Anda yang ingin mendaftar, baca link berikut:
http://diskusiweb.com/discussion/50491/how-to-registrasi-diskusiweb-com-baca-ini-terlebih-dahulu
- Cara menyisipkan kode program supaya tampil rapi dan terformat dengan baik di diskusiweb.com: http://www.diskusiweb.com/discussion/50415/cara-menyisipkan-kode-program-di-diskusiweb-com
- Cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

uyung

About

Username
uyung
Joined
Visits
258
Last Active
Roles
Member

Activity

  • gopei777
    mas uyung,.. mohon bantuannya donk, koq code saya masalah,.. saya buat controller edit koq malah datanya delete yach ?? bingung nich.. sy pake PHP-CI,.... mohon pencerahannya mas....

    function dp_plant1_edit($id){

    $data['delaypull_plant1'] = $this->db->query("SELECT * FROM delaypull_plant1,cust,dest,part_info,cycle WHERE id_cust=nm_cust and id_dest=nm_dest and id_part=nm_part and id_cycle=nm_cycle and id_dp1='$id'" )->result();
    $this->load->view('dashboard/head');
    $this->load->view('dashboard/topbar');
    $this->load->view('dashboard/sidebar');
    $this->load->view('logistik/dp_plant1_edit',$data);
    $this->load->view('dashboard/js');
    $this->load->view('dashboard/foot');
    }
    function dp_plant1_update(){
    $id = $this->input->post('id');
    $cust = $this->input->post('cust');
    $dest = $this->input->post('dest');
    $part = $this->input->post('part');
    $qtyperkbn = $this->input->post('qtyperkbn');
    $qty = $this->input->post('qty');
    $total = $this->input->post('total');
    $line = $this->input->post('line');
    $status = $this->input->post('status');
    $cycle = $this->input->post('cycle');
    $waktupull = $this->input->post('waktupull');
    $waktukirim = $this->input->post('waktukirim');
    $target = $this->input->post('target');
    $problem = $this->input->post('problem');

    $this->form_validation->set_rules('status','Status','required');
    $this->form_validation->set_rules('problem','Problem','required');

    if($this->form_validation->run() != false){
    $where = array(
    'id_dp1' => $id
    );
    $data = array(
    'tgl' => date('Y-m-d H:i:s'),
    'id_cust' => $cust,
    'id_dest' => $dest,
    'id_part' => $part,
    'qtyperkbn' => $qtyperkbn,
    'qty' => $qty,
    'total_pcs' => $total,
    'line' => $line,
    'id_delay' => $status,
    'id_cycle' => $cycle,
    'timepull' => $timepull,
    'timedelv' => $timedelv,
    'target_wkt' => $target_wkt,
    'problem' => $problem
    );
    $this->m_part->update_data($where,$data,'delaypull_plant1');
    redirect(base_url().'logistik/dp_plant1');
    }else{
    $where = array(
    'id_dp1' => $id
    );
    $data['delaypull_plant1'] = $this->m_part->edit_data($where,'delaypull_plant1')->result();
    $this->load->view('dashboard/head');
    $this->load->view('dashboard/topbar');
    $this->load->view('dashboard/sidebar');
    $this->load->view('logistik/dp_plant1_edit',$data);
    $this->load->view('dashboard/js');
    $this->load->view('dashboard/foot');
    }
    }
    October 25