htdocs: use db exceptions and parameters. note: the logic there should be moved to classes
typo fixes
irc-bot: use db exceptions and parameters and db prefix placeholder
examples: use db exceptions and parameters and db prefix placeholder. note customer examples needs fixing
tests: do not define legacy APP_ db constants
fix legacy usage of getAssoc with 2 and 3 param swapped
db upgrade: use new database layer