Updated MySQL script