Skip to content

brunetton/adminer-tables_fuzzy_search

Repository files navigation

Presentation

AdminerTablesFuzzySearch is a plugin for Adminer that add a fuzzy search function on current DB tables. This is really useful when working on hudge databases with tons of tables.

screenshot

Usage

  • use 'F' access key to give focus to fuzzy search input. Depending on browser, it could be alt-shift-F or other key combination
  • type fuzzy name of table (without spaces)
  • use keyboard keys to select correct match
  • press enter to open selected table (or shift-enter to open it into a new tab)

Installation

  1. Download and install Adminer tool

  2. Create plugins folder next to adminer.php

  3. Download plugins.php, this file is needed to load plugins; and place it into plugins folder

  4. Download adminer-tables_fuzzy_search.php and place it into plugins folder

    File structure will be:

    - adminer.php
    - plugins
        - plugin.php
    	- adminer-tables_fuzzy_search.php
    	- ... (other plugins you've already installed)
    
  5. Edit or create index.php file next to adminer.php and configure plugins and add new AdminerTablesFuzzySearch() to $plugins array :

<?php

	function adminer_object()
	{
		// required to run any plugin
		include_once "./plugins/plugin.php";

		// autoloader
		foreach (glob("plugins/*.php") as $filename) {
			include_once "./$filename";
		}

		$plugins = array(
			// specify enabled plugins here
			new AdminerTablesFuzzySearch(),
		);

		return new AdminerPlugin($plugins);
	}

	// include original Adminer or Adminer Editor
	include "./adminer.php";

Final file structure will be:

- adminer.php
- index.php
- plugins
	- plugin.php
	- adminer-tables_fuzzy_search.php
	- ...

Credits

All fuzzy search is done with the excellent Ben Ripkens's fuzzy.js library.

About

Adminer plugin for fuzzy search (filter) in tables list

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published