This good contribution was showing banners that were also set to disabled.I simply added a condition to the sql so it will check the status of a banner and then display correctly.
All creds to author, this is a very good contibution!

More...