From 8a70099520d228d1157c2b5528cbb0af171008b6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 4 Jan 2006 13:54:18 +0000 Subject: [PATCH] updated glpi class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2407 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_glpi.inc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/class_glpi.inc b/include/class_glpi.inc index 6c390cd43..2170e0089 100644 --- a/include/class_glpi.inc +++ b/include/class_glpi.inc @@ -824,6 +824,30 @@ class glpiDB{ return($this->is_connected); } + function deleteAttachment($id) + { + if($this->is_connected){ + $qry = "DELETE FROM glpi_docs WHERE ID=".$id.""; + $this->query($qry); + }else{ + echo "not connected"; + return(false); + } + } + + function getAttachments() + { + if($this->is_connected){ + $qry = "SELECT * FROM glpi_docs WHERE name!='';"; + $ret = $this->query($qry); + return($ret); + }else{ + echo "not connected"; + return(false); + } + } + + } //$s = new glpiDB("vserver-01","glpi","tester","glpi"); //print_r($s->query("SELECT * FROM glpi_computers")); -- 2.30.2