Forgot to quote a callback string. (Only in PHP can you even get away with that.)
Added conditional code for handling Drupal 7.x database connections.
Did not know that Drupal 7 has a Query class.  Had to jump through hoops to make Ground Query not conflict.  Fortunately Ground Query is only really used through ->create_query() so it was not the end of the world.