An example of a mysql custom function