updating mysql functions