MyQuery Builder: AJAX-based MySQL Query Construction

January 20th, 2007

UPDATE 8/15/2011: – MyQuery Builder has been significantly updated since the post below was written. MyQuery Builder is now hosted at http://www.myquerybuilder.com.

MyQuery Builder is a web-based, visual MySQL query builder that is built on top of the fantastic Script.aculo.us libs. The initial release is available over on SourceForge.net.

There’s one kink in my development pipeline that makes people question my sanity. Back in the mid-90′s, I started building database apps in Access. I cringe to think of how painful this was back then, but one thing Microsoft had from the earliest days of this app was a visual query builder. This dark corner of the app was pure brilliance. You simply drag and drop fields and tables to construct even the most complex compound query.

Fast forward to today. While I haven’t used Access to build a database in more than a decade, I still find that I use the visual query builder to build complex JOINs and conditional queries. In fact, aside from checking sites in IE and Firefox, this is the only other thing I use Windows for.

Because it’s a bit of a pain to fire up Parallels just to build a query, I’ve always kept my eye out for an AJAX-y tool that does the same thing. Oddly, I’ve never found said tool, so I wrote one myself.

MyQuery Builder allows you to drag and drop fields and tables to construct complex JOINs, conditional WHEREs, ORDER BYs, and GROUP BYs. I find that I’m using it more and more.

While it is far from complete, this initial version is about 90% of the way there. In the future, I hope to add support for additional query types other than SELECTs, in addition to improving the interface and easing the workflow. I also have dreams that people will find the tool useful and actually contribute back to the codebase with their own improvements.

One thing that I’m stuck on is a way to draw arrows between connected fields. If anyone knows how to do this, please email me a link to a tutorial to steve at stringer sites dot com.

Links:
MyQuery Builder

Sphere: Related Content

  • rosetyler73

    Great blog! The information you provide is quiet helpful, why I was not able to find it earlier. Anyways I’ve subscribed to your feeds, keep the good work up.