public static function GetByID($id) { if (!is_numeric($id)) { return null; } $tenant = Tenant::GetCurrent(); $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "TenantEnumerations WHERE enum_ID = " . $id . " AND enum_TenantID = " . $tenant->ID; $result = $MySQL->query($query); if ($result === false) { return null; } $count = $result->num_rows; if ($count == 0) { return null; } $values = $result->fetch_assoc(); return TenantEnumeration::GetByAssoc($values); }