Finished conversion to mysql