diff --git a/crud_ci/application/models/products_model.php b/crud_ci/application/models/products_model.php index 274fead..e923c3e 100644 --- a/crud_ci/application/models/products_model.php +++ b/crud_ci/application/models/products_model.php @@ -21,6 +21,11 @@ function getAllProducts() function getProduct($id) { //select produk berdasarkan id yang dimiliki + $this->db->select("*"); + $this->db->from("msProduct"); + $this->db->where("id", $id); + + return $this->db->get(); } function addProduct($data) @@ -38,4 +43,4 @@ function deleteProduct($id) { //delete produk berdasarkan id } -} \ No newline at end of file +}