static function GetRecordById($id) { if (!self::$filter) { self::$filter = new CFilter($id, 0, 0, 0, 0, 0, 0, 0); } self::LoadData(); $i = 0; while ($i < self::$count) { $record = self::$data[$i]; if ($record->GetId() == $id) { return $record; } $i++; } return null; }