25 $this->properties = $a_properties;
38 $this->properties->getADT()->reset();
40 $sql =
"SELECT * FROM ".$this->properties->getTable().
41 " WHERE ".$this->properties->buildPrimaryWhere();
42 $set = $ilDB->query($sql);
43 if($ilDB->numRows($set))
45 $row = $ilDB->fetchAssoc($set);
46 $this->properties->readRecord(
$row);
59 $fields = $this->properties->getPrimary();
60 $this->properties->prepareInsert($fields);
62 $ilDB->insert($this->properties->getTable(), $fields);
65 $this->properties->afterInsert();
76 $this->properties->prepareUpdate($fields);
79 $ilDB->update($this->properties->getTable(), $fields, $this->properties->getPrimary());
82 $this->properties->afterUpdate();
88 public function delete()
92 $ilDB->manipulate(
"DELETE FROM ".$this->properties->getTable().
93 " WHERE ".$this->properties->buildPrimaryWhere());
96 $this->properties->afterDelete();
create()
Create/insert record.
ADT Active Record helper class.
__construct(ilADTGroupDBBridge $a_properties)
Constructor.