fixed ajax bug where success function wasn't being called
added updated sql export