adding the mysql formula from salt formulas