works with sql database

no problems in this file, works like a charm