hosting_db_server_handler_filter_db_server_type.inc

Define a views filter handler to filter by database type.

Classes

Namesort descending Description
hosting_db_server_handler_filter_db_server_type Filter handler to allowing filtering by database type.

File

db_server/hosting_db_server_handler_filter_db_server_type.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Define a views filter handler to filter by database type.
  5. */
  6. /**
  7. * Filter handler to allowing filtering by database type.
  8. */
  9. class hosting_db_server_handler_filter_db_server_type extends views_handler_filter_in_operator {
  10. function get_value_options() {
  11. if (!isset($this->value_options)) {
  12. $this->value_title = t('DB Sever Type');
  13. $result = db_query("SELECT DISTINCT(db_type) FROM {hosting_db_server}");
  14. while ($db_server = $result->fetch()) {
  15. $options[$db_server->db_type] = $db_server->db_type;
  16. }
  17. $this->value_options = $options;
  18. }
  19. }
  20. }