Those of you using this for 2.7, just eliminate the database connection (you can also do this for 2.6) and use the sql that I posted (it's for 2.7)