示例#1
0
 /** 
  * Adds a generic attribute record (with this type) to the AttributeValues table
  */
 public function addAttributeValue()
 {
     $db = Loader::db();
     $u = new User();
     $dh = Loader::helper('date');
     $uID = $u->isRegistered() ? $u->getUserID() : 0;
     $avDate = $dh->getLocalDateTime();
     $v = array($this->atID, $this->akID, $uID, $avDate);
     $db->Execute('insert into AttributeValues (atID, akID,  uID, avDateAdded) values (?, ?, ?, ?)', $v);
     $avID = $db->Insert_ID();
     return AttributeValue::getByID($avID);
 }