74 $this->foreign_id = $a_val;
84 return $this->foreign_id;
94 $this->title = $a_val;
114 $nid = $ilDB->nextId(
"mep_item");
115 $ilDB->manipulate(
"INSERT INTO mep_item ".
116 "(obj_id, type, foreign_id, title) VALUES (".
117 $ilDB->quote($nid,
"integer").
",".
118 $ilDB->quote($this->
getType(),
"text").
",".
120 $ilDB->quote($this->
getTitle(),
"text").
132 $set = $ilDB->query(
"SELECT * FROM mep_item WHERE ".
133 "obj_id = ".$ilDB->quote($this->getId(),
"integer")
135 if ($rec = $ilDB->fetchAssoc($set))
153 $ilDB->manipulate(
"UPDATE mep_item SET ".
154 " type = ".$ilDB->quote($this->getType(),
"text").
",".
155 " foreign_id = ".$ilDB->quote($this->getForeignId(),
"integer").
",".
156 " title = ".$ilDB->quote($this->getTitle(),
"text").
157 " WHERE obj_id = ".$ilDB->quote($this->getId(),
"integer")
171 $ilDB->manipulate(
"DELETE FROM mep_item WHERE "
172 .
" obj_id = ".$ilDB->quote($this->getId(),
"integer")
182 private static function lookup($a_id, $a_field)
186 $set = $ilDB->query(
"SELECT ".$a_field.
" FROM mep_item WHERE ".
187 " obj_id = ".$ilDB->quote($a_id,
"integer"));
188 if ($rec = $ilDB->fetchAssoc($set))
190 return $rec[$a_field];
238 $ilDB->manipulate(
"UPDATE mep_item SET ".
239 " title = ".$ilDB->quote($title,
"text").
240 " WHERE foreign_id = ".$ilDB->quote($a_obj,
"integer").
241 " AND type = ".$ilDB->quote(
"mob",
"text")
253 $set = $ilDB->query(
"SELECT * FROM mep_tree ".
254 " WHERE child = ".$ilDB->quote($a_id,
"integer")
257 while ($rec = $ilDB->fetchAssoc($set))
259 $pool_ids[] = $rec[
"mep_id"];
274 $set = $ilDB->query(
"SELECT mep_tree.child as id".
275 " FROM mep_tree JOIN mep_item ON (mep_tree.child = mep_item.obj_id) WHERE ".
276 " mep_tree.mep_id = ".$ilDB->quote($a_id,
"integer").
" AND ".
277 " mep_item.type = ".$ilDB->quote($a_type,
"text")
281 while ($rec = $ilDB->fetchAssoc($set))