do not try to convert the dates when using mysql
added a mysql flag
make sure we call text() for the binding