You can use this plugin to query custom tables through a url in your site.