added mysql Function