Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function delete($id){
  2. // return "test";
  3. $data="";
  4. $row = $this->getKategori($id);
  5. if (count($row["data"]) == 0) {
  6. http_response_code(304);
  7. return array("msg"=>$row["msg"]."id ".$id);
  8. }
  9.  
  10. $kueri = "DELETE FROM ".$this->table_name;
  11. $kueri .=" WHERE id_kategori='".$id."'";
  12. $hasil = $this->db->query($kueri) or die ("Error ".$this->db->connect_error);
  13.  
  14. http_response_code(200);
  15. return array("msg"=>"success");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement