12 const TABLE_NAME =
"Match_CustomData";
16 public $DataValue =
"";
21 public function __construct($src = null, $stripSlashes =
false) {
26 $this->_loadByRow($src, $stripSlashes);
37 public static function Load ($idMatch, $returnArray =
false) {
38 $where = sprintf(
"IdMatch = %d", $idMatch);
39 return self::_load(self::GetTableName(__CLASS__), ($returnArray ?
"" : __CLASS__), $where);
49 $query = sprintf(
"REPLACE INTO %s (IdMatch, DataKey, DataValue) VALUES (%d, '%s', '%s')",
50 self::GetTableName(__CLASS__),
52 $Database->Escape($this->DataKey),
53 $Database->Escape($this->DataValue));
54 return $Database->Query($query);
64 if ($this->IdMatch > 0 && $this->DataKey) {
65 return $this->_Delete(self::GetTableName(__CLASS__), sprintf(
"IdMatch = %d AND DataKey = '%s'", $this->IdMatch, $Database->Escape($this->DataKey)));
__construct($src=null, $stripSlashes=false)
static Load($idMatch, $returnArray=false)