Updated database lib
Added db test
Added missing escaping
Added params to where methods
Fixed up the fill method
Filtering where clauses
Merge branch 'advanced-db'