Added mysql function