AnyWhereInDB – PHP app to search all MySQL tables

I am done with my diploma project on programming courses and will be returning to more regular post schedule (I hope I still have readers). On to post.

One of my constant struggles at work is dealing with large 850 tables MySQL database. Not much documentation and it falls on me to figure out what specific value means or where it links to. Global database search is not part of regular SQL functionality. It took few rounds with Google to find AnyWhereInDB – PHP script that implement such global search across all tables.

What it does

App is written in PHP, so first you need that. Already covered if top of some stack, will also take web server if you have MySQL alone.

Then you open it in browser as any PHP program and get login form. Login and target database information is stored in session or can be hardcoded in file.

After login you get simple form that executes search.

anywhereindb_interface

Results are displayed in rows, highlighted and grouped by tables.

Strong features

Works nicely and even generates SQL queries if you want to re-use them elsewhere.

Downsides

The way results are displayed it is inconvenient to scroll through long horizontal rows. Div block that contains them cuts right part off and with large amount of results scrolling bar is out of sight.

By default app only searches through varchar and text fields. To change that you need to patch source file (around line 167), as for me that could be made more convenient and I might improve it for myself if using often enough.

Overall

Highly useful and open source app.

Home&download http://code.google.com/p/anywhereindb/

Related Posts

2 Comments

  • Great review on my code. I have faced the downside problem you have said. if anyone can give a idea to solve that please do so. we can update that. thank you once again.
    Nafis Ahmad @happy56

  • @Nafis Ahmad

    Thank you for writing it. :) A lot of people tend to tell you how this can be done, but you just made working and convenient solution instead.

    If I get to implement some tweaks I have in mind I will be sure to send them your way.

Comments are closed.