JSON from ResultDB fixed.
Ajax functions for success and error requests improved.
SELECT queries fixed.