A Database Error Occurred

saya mau edit data tapi error = Unknown column 'workspace_group' in 'field list'.

ini model


function get_workspace_group($id){
        $this->db->select('a.workspace_id, b.group_workspace_id, b.group_name');
        $this->db->from('workspace_moredetail a');
        $this->db->join('group_workspace b', 'a.workspace_group = b.group_workspace_id', 'left');
        $this->db->where('a.workspace_id', $id);
        $this->db->where('b.deleted', '0');
        $this->db->order_by('group_workspace_id', 'asc');
        $query = $this->db->get();

        return $query->result_array();
    }

    function get_all_workspace_group($id){
        $this->db->select('group_workspace_id, group_name');
        $this->db->from('group_workspace');
        $this->db->where('deleted', '0');
        $this->db->order_by('group_workspace_id', 'asc');
        $query = $this->db->get();

        return $query->result_array();
    }

controller


$data['workspace_group'] = $this->input->get_post('workspaceGroup');

view


<div class="col-md-6" style="padding-right:0;">
                        <div class="form-group">
                            <label>Group Workspace</label>
                            <select name="workspaceGroup" class="form-control">
                                <option value="" disabled>-- Select Noise Level --</option>
                                <?php
                                foreach ($all_workspace_group as $group){
                                    if($group['group_workspace_id'] == $data[0]['workspace_group']){
                                        $selected = "selected";
                                    }else{
                                        $selected = "";
                                    }
                                    echo '<option value="'.$group['group_workspace_id'].'" '.$selected.'>'.$group['group_name'].'</option>';
                                }
                                ?>
                            </select>
                        </div>
                    </div>

avatar kuntoro46
@kuntoro46

18 Kontribusi 3 Poin

Diperbarui 7 tahun yang lalu

2 Jawaban:

Jawaban Terpilih

Column (Kolom) 'workspace_group' engga ada / tidak diketahui di field list.

avatar CodenameJR
@CodenameJR

278 Kontribusi 107 Poin

Dipost 7 tahun yang lalu

ada di database, tabel workspace_moredetail

avatar kuntoro46
@kuntoro46

18 Kontribusi 3 Poin

Dipost 7 tahun yang lalu

Login untuk ikut Jawaban