This is a mysql adaptaion to the