Converted data from arrays to MySQL