Small fix

changed MySQL structure and fixed insert