export more stuff from mysql, make a list of what's remaining
move db format_date into shared module
mysql escape_identifier