Skip to content

Commit

Permalink
get_analisis_klasifikasi
Browse files Browse the repository at this point in the history
  • Loading branch information
totoprayogo1916 committed Aug 15, 2023
1 parent 10199d8 commit a4eff4d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
6 changes: 4 additions & 2 deletions donjo-app/controllers/Analisis_klasifikasi.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ public function index($p = 1, $o = 0)
view('footer');
}

public function form($p = 1, $o = 0, $id = '')
public function form($p, $o, $id)
{
$analisisKlasifikasiModel = new AnalisisKlasifikasi();

$data['p'] = $p;
$data['o'] = $o;

if ($id) {
$data['analisis_klasifikasi'] = $this->analisis_klasifikasi_model->get_analisis_klasifikasi($id);
$data['analisis_klasifikasi'] = $analisisKlasifikasiModel->get_analisis_klasifikasi($id);
$data['form_action'] = site_url("analisis_klasifikasi/update/{$p}/{$o}/{$id}");
} else {
$data['analisis_klasifikasi'] = null;
Expand Down
7 changes: 7 additions & 0 deletions donjo-app/models/AnalisisKlasifikasi.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ public function delete_all()
}
}

public function get_analisis_klasifikasi(int $id)
{
$query = $this->db->get_where($this->table, ['id' => $id]);

return $query->row_array();
}

/**
* Fungsi ini digunakan untuk menghasilkan data untuk proses autocomplete.
*/
Expand Down
8 changes: 0 additions & 8 deletions donjo-app/models/Analisis_grafik_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,6 @@ public function list_data2($o = 0, $offset = 0, $limit = 500)
return $data;
}

public function get_analisis_klasifikasi($id = 0)
{
$sql = 'SELECT * FROM analisis_klasifikasi WHERE id=?';
$query = $this->db->query($sql, $id);

return $query->row_array();
}

public function get_analisis_master()
{
$sql = 'SELECT * FROM analisis_master WHERE id=?';
Expand Down
8 changes: 0 additions & 8 deletions donjo-app/models/Analisis_klasifikasi_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ public function list_data($o = 0, $offset = 0, $limit = 500)
return $data;
}

public function get_analisis_klasifikasi($id = 0)
{
$sql = 'SELECT * FROM analisis_klasifikasi WHERE id=?';
$query = $this->db->query($sql, $id);

return $query->row_array();
}

public function get_analisis_master()
{
$sql = 'SELECT * FROM analisis_master WHERE id=?';
Expand Down

0 comments on commit a4eff4d

Please sign in to comment.