Removed sql commands because database is flawed. Database structure and functions must be updated.