db: faq: not to use deprecated escapeInteger/escapeString
db: add orderBy validator
db: history: not to use deprecated escapeInteger/escapeString