how to create function in mysql