changed from sql to mysql syntax