Update my_model.php

Mainly changes include adding support per function to run according to the selected database driver.